Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.6
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.ast.expr
[Java] Class VariableExpression

    java.lang.Object
      org.codehaus.groovy.ast.ASTNode
          org.codehaus.groovy.ast.AnnotatedNode
              org.codehaus.groovy.ast.expr.Expression
                  org.codehaus.groovy.ast.expr.VariableExpression

All Implemented Interfaces:
  Variable

    public class VariableExpression
    extends Expression

Represents a local variable name, the simplest form of expression. e.g. "foo".

Authors:
  James Strachan

Version:
  \$Revision: 17968 \$

Field Summary
`static VariableExpression` | `SUPER_EXPRESSION`
`static VariableExpression` | `THIS_EXPRESSION`

Constructor Summary
`VariableExpression(String variable, ClassNode type)`
`VariableExpression(String variable)`
`VariableExpression(Variable variable)`

Method Summary
`Variable` | `getAccessedVariable()`
`Expression` | `getInitialExpression()`
`String` | `getName()`
`ClassNode` | `getOriginType()`
`String` | `getText()`
`ClassNode` | `getType()`
`boolean` | `hasInitialExpression()`
`boolean` | `isClosureSharedVariable()`
`boolean` | `isDynamicTyped()`
`boolean` | `isInStaticContext()`
`boolean` | `isSuperExpression()`
`boolean` | `isThisExpression()`
`boolean` | `isUseReferenceDirectly()`
`void` | `setAccessedVariable(Variable origin)`
`void` | `setClosureSharedVariable(boolean inClosure)`
`void` | `setInStaticContext(boolean inStaticContext)`
`void` | `setType(ClassNode cn)`
`void` | `setUseReferenceDirectly(boolean useRef)`
`String` | `toString()`
`Expression` | `transformExpression(ExpressionTransformer transformer)`
`void` | `visit(GroovyCodeVisitor visitor)`

Methods inherited from class Expression
getType, setType, transformExpression, transformExpressions, transformExpressions

Methods inherited from class AnnotatedNode
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic

Methods inherited from class ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getText, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Field Detail

### SUPER_EXPRESSION

    public static final VariableExpression SUPER_EXPRESSION

### THIS_EXPRESSION

    public static final VariableExpression THIS_EXPRESSION

Constructor Detail

### VariableExpression

    public VariableExpression(String variable, ClassNode type)

### VariableExpression

    public VariableExpression(String variable)

### VariableExpression

    public VariableExpression(Variable variable)

Method Detail

### getAccessedVariable

    public Variable getAccessedVariable()

### getInitialExpression

    public Expression getInitialExpression()

### getName

    public String getName()

### getOriginType

    public ClassNode getOriginType()

### getText

    public String getText()

### getType

    public ClassNode getType()

### hasInitialExpression

    public boolean hasInitialExpression()

### isClosureSharedVariable

    public boolean isClosureSharedVariable()

### isDynamicTyped

    public boolean isDynamicTyped()

### isInStaticContext

    public boolean isInStaticContext()

### isSuperExpression

    public boolean isSuperExpression()

### isThisExpression

    public boolean isThisExpression()

### isUseReferenceDirectly

    public boolean isUseReferenceDirectly()

### setAccessedVariable

    public void setAccessedVariable(Variable origin)

### setClosureSharedVariable

    public void setClosureSharedVariable(boolean inClosure)

### setInStaticContext

    public void setInStaticContext(boolean inStaticContext)

### setType

    public void setType(ClassNode cn)

### setUseReferenceDirectly

    public void setUseReferenceDirectly(boolean useRef)

### toString

    public String toString()

### transformExpression

    public Expression transformExpression(ExpressionTransformer transformer)

### visit

    public void visit(GroovyCodeVisitor visitor)

Copyright © 2003-2010 The Codehaus. All rights reserved.