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()
Gets an iterator for the referenced local variables.
|
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 classScope) |
void |
setInStaticContext(boolean inStaticContext) |
public VariableScope()
public VariableScope(VariableScope parent)
public VariableScope getParent()
public boolean isRoot()
public ClassNode getClassScope()
public boolean isClassScope()
public void setClassScope(ClassNode classScope)
public boolean isInStaticContext()
public void setInStaticContext(boolean inStaticContext)
public boolean isReferencedLocalVariable(String name)
public boolean isReferencedClassVariable(String name)
public Map<String,Variable> getDeclaredVariables()
public Map<String,Variable> getReferencedClassVariables()
public int getReferencedLocalVariablesCount()
public Iterator<Variable> getDeclaredVariablesIterator()
public Iterator<Variable> getReferencedLocalVariablesIterator()
public Iterator<Variable> getReferencedClassVariablesIterator()
public void putDeclaredVariable(Variable var)
public void putReferencedLocalVariable(Variable var)
public void putReferencedClassVariable(Variable var)
public VariableScope copy()