|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.ast.VariableScope
public class VariableScope
Represents a variable scope. This is primarily used to determine variable sharing across method and closure boundaries.
Constructor Summary | |
---|---|
VariableScope()
|
|
VariableScope(VariableScope parent)
|
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VariableScope()
public VariableScope(VariableScope parent)
Method Detail |
---|
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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |