org.jruby.parser
Class LocalStaticScope
java.lang.Object
org.jruby.parser.StaticScope
org.jruby.parser.LocalStaticScope
- All Implemented Interfaces:
- java.io.Serializable
public class LocalStaticScope
- extends StaticScope
- See Also:
- Serialized Form
Methods inherited from class org.jruby.parser.StaticScope |
addVariable, assign, capture, declare, determineModule, exists, getArity, getEnclosingScope, getModule, getNumberOfVariables, getOptionalArgs, getPreviousCRefScope, getRequiredArgs, getRestArg, getVariables, isArgumentScope, isCaptured, isDefined, setArgumentScope, setArities, setModule, setOptionalArgs, setRequiredArgs, setRestArg, setVariables |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalStaticScope
public LocalStaticScope(StaticScope enclosingScope)
LocalStaticScope
public LocalStaticScope(StaticScope enclosingScope,
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
public AssignableNode assign(ISourcePosition position,
java.lang.String name,
Node value,
StaticScope topScope,
int depth)
- Specified by:
assign
in class StaticScope
declare
public Node declare(ISourcePosition position,
java.lang.String name,
int depth)
- Specified by:
declare
in class StaticScope
Copyright © 2002-2007 JRuby Team. All Rights Reserved.