|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.ast.VariableScope
Represents a variable scope. This is primarily used to determine variable sharing across method and closure boundaries.
Field Summary | |
private java.util.List |
children
|
private java.util.Set |
declaredVariables
|
(package private) static int |
i
|
(package private) java.lang.String |
name
|
private VariableScope |
parent
|
private java.util.Set |
referencedVariables
|
private java.util.Set |
varsDeclaredHere
br contain vars really declared and defined in the current scope. |
Constructor Summary | |
VariableScope()
|
|
VariableScope(VariableScope parent)
|
Method Summary | |
protected void |
append(VariableScope scope)
Appends all of the references and declarations from the given scope to this one |
protected void |
appendRecursive(VariableScope scope)
Appends all of the references and declarations from the given scope and all its children to this one |
void |
computeRealDeclares()
|
VariableScope |
createCompositeChildScope()
Creates a composite variable scope combining all the variable references and declarations from all the child scopes not including this scope |
VariableScope |
createRecursiveChildScope()
Creates a scope including this scope and all nested scopes combined together |
VariableScope |
createRecursiveParentScope()
Creates a scope including this scope and all parent scopes combined together |
java.util.List |
getChildren()
|
java.util.Set |
getDeclaredVariables()
|
java.util.Set |
getReferencedVariables()
|
java.util.Set |
getVarsDeclaredHere()
|
void |
setVarsDeclaredHere(java.util.Set varsDeclaredHere)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static int i
private java.util.Set declaredVariables
private java.util.Set referencedVariables
private java.util.Set varsDeclaredHere
private VariableScope parent
private java.util.List children
java.lang.String name
Constructor Detail |
public VariableScope()
public VariableScope(VariableScope parent)
Method Detail |
public java.util.Set getDeclaredVariables()
public java.util.Set getReferencedVariables()
public java.util.List getChildren()
public VariableScope createCompositeChildScope()
public VariableScope createRecursiveChildScope()
public VariableScope createRecursiveParentScope()
protected void append(VariableScope scope)
scope
- protected void appendRecursive(VariableScope scope)
scope
- public void computeRealDeclares()
public java.util.Set getVarsDeclaredHere()
public void setVarsDeclaredHere(java.util.Set varsDeclaredHere)
varsDeclaredHere
- The varsDeclaredHere to set.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |