org.codehaus.groovy.ast
Class VariableScope

java.lang.Object
  extended by org.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.

Version:
$Revision: 3419 $
Author:
James Strachan, Jochen Theodorou

Constructor Summary
VariableScope()
           
VariableScope(VariableScope parent)
           
 
Method Summary
 VariableScope copy()
           
 ClassNode getClassScope()
           
 Variable getDeclaredVariable(String name)
           
 Map getDeclaredVariables()
           
 VariableScope getParent()
           
 Map getReferencedClassVariables()
           
 Map getReferencedLocalVariables()
           
 boolean isClassScope()
           
 boolean isInStaticContext()
           
 boolean isReferencedClassVariable(String name)
           
 boolean isReferencedLocalVariable(String name)
           
 boolean isResolvingDynamic()
           
 boolean isRoot()
           
 void setClassScope(ClassNode node)
           
 void setDynamicResolving(boolean resolvesDynamic)
           
 void setInStaticContext(boolean inStaticContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VariableScope

public VariableScope()

VariableScope

public VariableScope(VariableScope parent)
Method Detail

getDeclaredVariables

public Map getDeclaredVariables()

getDeclaredVariable

public Variable getDeclaredVariable(String name)

getReferencedLocalVariables

public Map getReferencedLocalVariables()

isReferencedLocalVariable

public boolean isReferencedLocalVariable(String name)

getReferencedClassVariables

public Map getReferencedClassVariables()

isReferencedClassVariable

public boolean isReferencedClassVariable(String name)

getParent

public VariableScope getParent()

isInStaticContext

public boolean isInStaticContext()

setInStaticContext

public void setInStaticContext(boolean inStaticContext)

isResolvingDynamic

public boolean isResolvingDynamic()

setDynamicResolving

public void setDynamicResolving(boolean resolvesDynamic)

setClassScope

public void setClassScope(ClassNode node)

getClassScope

public ClassNode getClassScope()

isClassScope

public boolean isClassScope()

isRoot

public boolean isRoot()

copy

public VariableScope copy()


Copyright © 2003-2010 The Codehaus. All Rights Reserved.