org.jruby.parser
Class BlockStaticScope
java.lang.Object
org.jruby.parser.StaticScope
org.jruby.parser.BlockStaticScope
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- EvalStaticScope
public class BlockStaticScope
- extends StaticScope
- See Also:
- Serialized Form
Methods inherited from class org.jruby.parser.StaticScope |
addVariable, assign, capture, declare, determineModule, exists, getArity, getConstant, getConstantWithConstMissing, getDummyScope, getEnclosingScope, getModule, getNumberOfVariables, getOptionalArgs, getPreviousCRefScope, getRequiredArgs, getRestArg, getVariables, isArgumentScope, isBackrefLastlineScope, isCaptured, isDefined, setArgumentScope, setArities, setBackrefLastlineScope, setModule, setPreviousCRefScope, setRequiredArgs, setRestArg, setVariables |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BlockStaticScope
public BlockStaticScope(StaticScope parentScope)
BlockStaticScope
public BlockStaticScope(StaticScope parentScope,
java.lang.String[] names)
getLocalScope
public StaticScope getLocalScope()
- Description copied from class:
StaticScope
- Gets the Local Scope relative to the current Scope. For LocalScopes this will be itself.
Blocks will contain the LocalScope it contains.
- Specified by:
getLocalScope
in class StaticScope
- Returns:
- localScope
isDefined
public int isDefined(java.lang.String name,
int depth)
- Specified by:
isDefined
in class StaticScope
getAllNamesInScope
public java.lang.String[] getAllNamesInScope()
- Description copied from class:
StaticScope
- Get all visible variables that we can see from this scope that have been assigned
(e.g. seen so far)
- Specified by:
getAllNamesInScope
in class StaticScope
- Returns:
- a list of all names (sans $~ and $_ which are special names)
- See Also:
StaticScope.getAllNamesInScope()
assign
protected AssignableNode assign(ISourcePosition position,
java.lang.String name,
Node value,
StaticScope topScope,
int depth)
- Specified by:
assign
in class StaticScope
addAssign
public AssignableNode addAssign(ISourcePosition position,
java.lang.String name,
Node value)
declare
public Node declare(ISourcePosition position,
java.lang.String name,
int depth)
- Specified by:
declare
in class StaticScope
toString
public java.lang.String toString()
- Overrides:
toString
in class StaticScope
Copyright © 2002-2007 JRuby Team. All Rights Reserved.