| Modifier and Type | Field and Description |
|---|---|
| private Variable | |
| pack-priv boolean | |
| private boolean | |
| private boolean | |
| private int | |
| private final ClassNode | |
| public static final VariableExpression | |
| public static final VariableExpression | |
| pack-priv boolean | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Variable | |
| public Expression | getInitialExpression()
Implements org. |
| public int | |
| public String | |
| public ClassNode | Returns: the type which was used to define this variable expressionImplements org. |
| public String | |
| public ClassNode | getType()
Overrides org. Implements org. |
| public boolean | hasInitialExpression()
Implements org. |
| public boolean | Returns: true if this variable is used in a closureImplements org. def str = 'Hello'
def cl = { println str }
|
| public boolean | |
| public boolean | isInStaticContext()
Implements org. |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | |
| public void | setClosureSharedVariable(boolean
tells if this variable is later referenced in a closure inClosure)Implements org. def str = 'Hello'
def cl = { println str }
|
| public void | |
| public void | |
| public void | |
| public void | |
| public String | |
| public Expression | transformExpression(ExpressionTransformer transformer)
Implements abstract org. |
| public void |
| accessedVariable | back to summary |
|---|---|
| private Variable accessedVariable | |
| closureShare | back to summary |
|---|---|
| pack-priv boolean closureShare | |
| inStaticContext | back to summary |
|---|---|
| private boolean inStaticContext | |
| isDynamicTyped | back to summary |
|---|---|
| private boolean isDynamicTyped | |
| modifiers | back to summary |
|---|---|
| private int modifiers | |
| originType | back to summary |
|---|---|
| private final ClassNode originType | |
| SUPER_EXPRESSION | back to summary |
|---|---|
| public static final VariableExpression SUPER_EXPRESSION | |
| THIS_EXPRESSION | back to summary |
|---|---|
| public static final VariableExpression THIS_EXPRESSION | |
| useRef | back to summary |
|---|---|
| pack-priv boolean useRef | |
| variable | back to summary |
|---|---|
| private final String variable | |
| VariableExpression | back to summary |
|---|---|
| public VariableExpression(String name, ClassNode type) | |
| VariableExpression | back to summary |
|---|---|
| public VariableExpression(String variable) | |
| VariableExpression | back to summary |
|---|---|
| public VariableExpression(Variable variable) | |
| getAccessedVariable | back to summary |
|---|---|
| public Variable getAccessedVariable() | |
| getInitialExpression | back to summary |
|---|---|
| public Expression getInitialExpression() Implements org. Doc from org. expression used to initialize the variable or null of there is no initialization.
| |
| getModifiers | back to summary |
|---|---|
| public int getModifiers() Implements org.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Doc from org. the name of the variable
| |
| getOriginType | back to summary |
|---|---|
| public ClassNode getOriginType() Implements org. Returns the type which was used when this variable expression was created. For example,
| |
| getText | back to summary |
|---|---|
| public String getText() Overrides org.
| |
| getType | back to summary |
|---|---|
| public ClassNode getType() Overrides org. Implements org. Doc from org. the type of the variable
| |
| hasInitialExpression | back to summary |
|---|---|
| public boolean hasInitialExpression() Implements org. Doc from org. returns true if there is an initialization expression
| |
| isClosureSharedVariable | back to summary |
|---|---|
| public boolean isClosureSharedVariable() Implements org. Tells if this variable or the accessed variable is used in a closure context, like in the following example : def str = 'Hello'
def cl = { println str }
The "str" variable is closure shared.
| |
| isDynamicTyped | back to summary |
|---|---|
| public boolean isDynamicTyped() Implements org.
| |
| isInStaticContext | back to summary |
|---|---|
| public boolean isInStaticContext() Implements org. Doc from org. 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
| |
| isSuperExpression | back to summary |
|---|---|
| public boolean isSuperExpression() | |
| isThisExpression | back to summary |
|---|---|
| public boolean isThisExpression() | |
| isUseReferenceDirectly | back to summary |
|---|---|
| public boolean isUseReferenceDirectly() For internal use only. This flag is used by compiler internals and should probably be converted to a node metadata in future. | |
| setAccessedVariable | back to summary |
|---|---|
| public void setAccessedVariable(Variable origin) | |
| setClosureSharedVariable | back to summary |
|---|---|
| public void setClosureSharedVariable(boolean inClosure) Implements org. Use this method to tell if a variable is used in a closure, like in the following example: def str = 'Hello'
def cl = { println str }
The "str" variable is closure shared. The variable expression inside the closure references an
accessed variable "str" which must have the closure shared flag set.
| |
| setInStaticContext | back to summary |
|---|---|
| public void setInStaticContext(boolean inStaticContext) | |
| setModifiers | back to summary |
|---|---|
| public void setModifiers(int modifiers) | |
| setType | back to summary |
|---|---|
| public void setType(ClassNode cn) Overrides org. Set the type of this variable. If you call this method from an AST transformation and that
the | |
| setUseReferenceDirectly | back to summary |
|---|---|
| public void setUseReferenceDirectly(boolean useRef) For internal use only. This flag is used by compiler internals and should probably be converted to a node metadata in future. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| transformExpression | back to summary |
|---|---|
| public Expression transformExpression(ExpressionTransformer transformer) Implements abstract org. Doc from org. Return a copy of the expression calling the transformer on any nested expressions
| |
| visit | back to summary |
|---|---|
| public void visit(GroovyCodeVisitor visitor) Overrides org.
| |