public class VariableScope
extends java.lang.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(java.lang.String name) |
VariableScope |
getParent() |
Variable |
getReferencedClassVariable(java.lang.String name) |
java.util.Map<java.lang.String,Variable> |
getReferencedClassVariables()
Gets a map containing the class variables referenced
by this scope.
|
java.util.Iterator<Variable> |
getReferencedClassVariablesIterator()
Gets an iterator for the referenced class variables.
|
Variable |
getReferencedLocalVariable(java.lang.String name) |
int |
getReferencedLocalVariablesCount() |
java.util.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(java.lang.String name) |
boolean |
isReferencedLocalVariable(java.lang.String name) |
boolean |
isRoot() |
void |
putDeclaredVariable(Variable var) |
void |
putReferencedClassVariable(Variable var) |
void |
putReferencedLocalVariable(Variable var) |
java.lang.Object |
removeReferencedClassVariable(java.lang.String name) |
void |
setClassScope(ClassNode node) |
void |
setInStaticContext(boolean inStaticContext) |
public VariableScope()
public VariableScope(VariableScope parent)
public Variable getDeclaredVariable(java.lang.String name)
public boolean isReferencedLocalVariable(java.lang.String name)
public boolean isReferencedClassVariable(java.lang.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 java.util.Iterator<Variable> getReferencedLocalVariablesIterator()
public int getReferencedLocalVariablesCount()
public Variable getReferencedLocalVariable(java.lang.String name)
public void putReferencedLocalVariable(Variable var)
public void putReferencedClassVariable(Variable var)
public Variable getReferencedClassVariable(java.lang.String name)
public java.lang.Object removeReferencedClassVariable(java.lang.String name)
public java.util.Map<java.lang.String,Variable> getReferencedClassVariables()
public java.util.Iterator<Variable> getReferencedClassVariablesIterator()