Top Description Methods
org.codehaus.groovy.ast

public Interface Variable

Known Direct Implementers
org.codehaus.groovy.ast.expr.VariableExpression, org.codehaus.groovy.ast.FieldNode, org.codehaus.groovy.ast.DynamicVariable, org.codehaus.groovy.ast.Parameter, org.codehaus.groovy.ast.PropertyNode
Imports
org.codehaus.groovy.ast.expr.Expression

interface to mark a AstNode as Variable. Typically these are VariableExpression, FieldNode, PropertyNode and Parameter

Method Summary

Modifier and TypeMethod and Description
public Expression
getInitialExpression()

expression used to initialize the variable or null of there is no initialization.

public int
public String
getName()

the name of the variable

public ClassNode
getOriginType()

the type before wrapping primitives type of the variable

public ClassNode
getType()

the type of the variable

public boolean
hasInitialExpression()

returns true if there is an initialization expression

public boolean
public boolean
public boolean
isInStaticContext()

returns true if this variable is used in a static context.

public void
setClosureSharedVariable(boolean inClosure)

Method Detail

getInitialExpressionback to summary
public Expression getInitialExpression()

expression used to initialize the variable or null of there is no initialization.

getModifiersback to summary
public int getModifiers()
getNameback to summary
public String getName()

the name of the variable

getOriginTypeback to summary
public ClassNode getOriginType()

the type before wrapping primitives type of the variable

getTypeback to summary
public ClassNode getType()

the type of the variable

hasInitialExpressionback to summary
public boolean hasInitialExpression()

returns true if there is an initialization expression

isClosureSharedVariableback to summary
public boolean isClosureSharedVariable()
isDynamicTypedback to summary
public boolean isDynamicTyped()
isInStaticContextback to summary
public boolean isInStaticContext()

returns true if this variable is used in a static context. A static context is any static initializer block, when this variable is declared as static or when this variable is used in a static method

setClosureSharedVariableback to summary
public void setClosureSharedVariable(boolean inClosure)