public class VariableScope extends Object
Constructor and Description |
---|
VariableScope() |
VariableScope(VariableScope parent) |
Modifier and Type | Method 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) |
public VariableScope()
public VariableScope(VariableScope parent)
public boolean isReferencedLocalVariable(String name)
public boolean isReferencedClassVariable(String name)
public VariableScope getParent()
public boolean isInStaticContext()
public void setInStaticContext(boolean inStaticContext)
public void setClassScope(ClassNode node)
public ClassNode getClassScope()
public boolean isClassScope()
public boolean isRoot()
public VariableScope copy()
public void putDeclaredVariable(Variable var)
public int getReferencedLocalVariablesCount()
public void putReferencedLocalVariable(Variable var)
public void putReferencedClassVariable(Variable var)
public Map<String,Variable> getReferencedClassVariables()
public Iterator<Variable> getReferencedClassVariablesIterator()
public Map<String,Variable> getDeclaredVariables()