Represents a variable scope. This is primarily used to determine variable sharing across method and closure boundaries.
Constructor and description |
---|
VariableScope
() |
VariableScope
(VariableScope parent) |
Type Params | Return Type | Name and description |
---|---|---|
|
VariableScope |
copy() |
|
ClassNode |
getClassScope() Non-null iff this scope corresponds to a class; as opposed to a method, "if" statement, block statement, etc. |
|
Variable |
getDeclaredVariable(String name) |
|
Map<String, Variable> |
getDeclaredVariables() Gets a map containing the variables declared in this scope. |
|
Iterator<Variable> |
getDeclaredVariablesIterator() Gets an iterator for the declared class variables. |
|
VariableScope |
getParent() |
|
Variable |
getReferencedClassVariable(String name) |
|
Map<String, Variable> |
getReferencedClassVariables() Gets a map containing the class variables referenced by this scope. |
|
Iterator<Variable> |
getReferencedClassVariablesIterator() Gets an iterator for the referenced class variables. |
|
Variable |
getReferencedLocalVariable(String name) |
|
int |
getReferencedLocalVariablesCount() |
|
Iterator<Variable> |
getReferencedLocalVariablesIterator() |
|
boolean |
isClassScope() Returns true iff this scope corresponds to a class; as opposed to a method, "if" statement, block statement, etc. |
|
boolean |
isInStaticContext() |
|
boolean |
isReferencedClassVariable(String name) |
|
boolean |
isReferencedLocalVariable(String name) |
|
boolean |
isRoot() |
|
void |
putDeclaredVariable(Variable var) |
|
void |
putReferencedClassVariable(Variable var) |
|
void |
putReferencedLocalVariable(Variable var) |
|
Object |
removeReferencedClassVariable(String name) |
|
void |
setClassScope(ClassNode node) |
|
void |
setInStaticContext(boolean inStaticContext) |
Non-null iff this scope corresponds to a class; as opposed to a method, "if" statement, block statement, etc.
Gets a map containing the variables declared in this scope. This map cannot be modified.
Gets an iterator for the declared class variables. The remove operation is not supported.
Gets a map containing the class variables referenced by this scope. This not can not be modified.
Gets an iterator for the referenced class variables. The remove operation is not supported.
Returns true iff this scope corresponds to a class; as opposed to a method, "if" statement, block statement, etc.
Copyright © 2003-2018 The Apache Software Foundation. All rights reserved.