| 
|||||||||
| 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 extends Object
Represents a variable scope. This is primarily used to determine variable sharing across method and closure boundaries.
| 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)
 | 
 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()
 | 
 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()
Deprecated.  | 
 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)
Deprecated.  | 
 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(String name)
public boolean isReferencedLocalVariable(String name)
public boolean isReferencedClassVariable(String name)
public VariableScope getParent()
public boolean isInStaticContext()
public void setInStaticContext(boolean inStaticContext)
@Deprecated public boolean isResolvingDynamic()
@Deprecated public void setDynamicResolving(boolean resolvesDynamic)
public void setClassScope(ClassNode node)
public ClassNode getClassScope()
public boolean isClassScope()
public boolean isRoot()
public VariableScope copy()
public void putDeclaredVariable(Variable var)
public Iterator<Variable> getReferencedLocalVariablesIterator()
public int getReferencedLocalVariablesCount()
public Variable getReferencedLocalVariable(String name)
public void putReferencedLocalVariable(Variable var)
public void putReferencedClassVariable(Variable var)
public Variable getReferencedClassVariable(String name)
public Object removeReferencedClassVariable(String name)
public Map<String,Variable> getReferencedClassVariables()
public Iterator<Variable> getReferencedClassVariablesIterator()
  | 
Copyright © 2003-2010 The Codehaus. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||