|
Groovy 1.7.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.ast.VariableScope
class VariableScope extends Object
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(String name)
|
VariableScope
|
getParent()
|
Variable
|
getReferencedClassVariable(String name)
|
Map
|
getReferencedClassVariables()
Gets a map containing the class variables referenced by this scope. |
Iterator
|
getReferencedClassVariablesIterator()
Gets an iterator for the referenced class variables. |
Variable
|
getReferencedLocalVariable(String name)
|
int
|
getReferencedLocalVariablesCount()
|
Iterator
|
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
|
isResolvingDynamic()
|
boolean
|
isRoot()
|
void
|
putDeclaredVariable(Variable var)
|
void
|
putReferencedClassVariable(Variable var)
|
void
|
putReferencedLocalVariable(Variable var)
|
Object
|
removeReferencedClassVariable(String name)
|
void
|
setClassScope(ClassNode node)
|
void
|
setDynamicResolving(boolean resolvesDynamic)
|
void
|
setInStaticContext(boolean inStaticContext)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll |
Constructor Detail |
---|
public VariableScope()
public VariableScope(VariableScope parent)
Method Detail |
---|
public VariableScope copy()
public ClassNode getClassScope()
public Variable getDeclaredVariable(String name)
public VariableScope getParent()
public Variable getReferencedClassVariable(String name)
public Map getReferencedClassVariables()
public Iterator getReferencedClassVariablesIterator()
public Variable getReferencedLocalVariable(String name)
public int getReferencedLocalVariablesCount()
public Iterator getReferencedLocalVariablesIterator()
public boolean isClassScope()
public boolean isInStaticContext()
public boolean isReferencedClassVariable(String name)
public boolean isReferencedLocalVariable(String name)
@Deprecated public boolean isResolvingDynamic()
public boolean isRoot()
public void putDeclaredVariable(Variable var)
public void putReferencedClassVariable(Variable var)
public void putReferencedLocalVariable(Variable var)
public Object removeReferencedClassVariable(String name)
public void setClassScope(ClassNode node)
@Deprecated public void setDynamicResolving(boolean resolvesDynamic)
public void setInStaticContext(boolean inStaticContext)
Copyright © 2003-2009 The Codehaus. All rights reserved.