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

## org.codehaus.groovy.ast.expr
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

    class VariableExpression
    extends Expression

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

author:
  James Strachan

version:
  $Revision: 17968 $

Field Summary
`static VariableExpression` | `SUPER_EXPRESSION`
`static VariableExpression` | `THIS_EXPRESSION`
`boolean` | `closureShare`
`boolean` | `useRef`

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, isSynthetic, setDeclaringClass, setSynthetic

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

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

Field Detail

### SUPER_EXPRESSION

    static final VariableExpression SUPER_EXPRESSION

### THIS_EXPRESSION

    static final VariableExpression THIS_EXPRESSION

### closureShare

    boolean closureShare

### useRef

    boolean useRef

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-2009 The Codehaus. All rights reserved.