Top Description Fields Constructors Methods
org.codehaus.groovy.ast

public Class PropertyNode

extends AnnotatedNode
implements Opcodes, Variable
Class Inheritance
All Implemented Interfaces
org.codehaus.groovy.ast.Variable, org.objectweb.asm.Opcodes
Imports
org.codehaus.groovy.ast.expr.Expression, org.codehaus.groovy.ast.stmt.Statement, org.objectweb.asm.Opcodes

Represents a property (member variable, a getter and setter)

Field Summary

Modifier and TypeField and Description
private FieldNode
private Statement
private final int
private Statement

Constructor Summary

AccessConstructor and Description
public
PropertyNode(String name, int modifiers, ClassNode type, ClassNode owner, Expression initialValueExpression, Statement getterBlock, Statement setterBlock)

public
PropertyNode(FieldNode field, int modifiers, Statement getterBlock, Statement setterBlock)

Method Summary

Modifier and TypeMethod and Description
public FieldNode
public Statement
public Expression
getInitialExpression()

Implements org.codehaus.groovy.ast.Variable.getInitialExpression.

expression used to initialize the variable or null of there is no initialization.
public int
public String
getName()

Implements org.codehaus.groovy.ast.Variable.getName.

the name of the variable
public ClassNode
getOriginType()

Implements org.codehaus.groovy.ast.Variable.getOriginType.

the type before wrapping primitives type of the variable
public Statement
public ClassNode
getType()

Implements org.codehaus.groovy.ast.Variable.getType.

the type of the variable
public boolean
hasInitialExpression()

Implements org.codehaus.groovy.ast.Variable.hasInitialExpression.

returns true if there is an initialization expression
public boolean
public boolean
public boolean
isInStaticContext()

Implements org.codehaus.groovy.ast.Variable.isInStaticContext.

returns true if this variable is used in a static context.
public boolean
public boolean
public boolean
public void
setClosureSharedVariable(boolean inClosure)

Implements org.codehaus.groovy.ast.Variable.setClosureSharedVariable.

Deprecated not used anymore, has no effect
public void
public void
public void
public void
Inherited from org.codehaus.groovy.ast.AnnotatedNode:
addAnnotationaddAnnotationsgetAnnotationsgetAnnotationsgetDeclaringClassgetGroovydocgetInstancehasNoRealSourcePositionisSyntheticsetDeclaringClasssetHasNoRealSourcePositionsetSynthetic

Field Detail

fieldback to summary
private FieldNode field
getterBlockback to summary
private Statement getterBlock
modifiersback to summary
private final int modifiers
setterBlockback to summary
private Statement setterBlock

Constructor Detail

PropertyNodeback to summary
public PropertyNode(String name, int modifiers, ClassNode type, ClassNode owner, Expression initialValueExpression, Statement getterBlock, Statement setterBlock)
PropertyNodeback to summary
public PropertyNode(FieldNode field, int modifiers, Statement getterBlock, Statement setterBlock)

Method Detail

getFieldback to summary
public FieldNode getField()
getGetterBlockback to summary
public Statement getGetterBlock()
getInitialExpressionback to summary
public Expression getInitialExpression()

Implements org.codehaus.groovy.ast.Variable.getInitialExpression.

Doc from org.codehaus.groovy.ast.Variable.getInitialExpression.

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

getModifiersback to summary
public int getModifiers()

Implements org.codehaus.groovy.ast.Variable.getModifiers.

getNameback to summary
public String getName()

Implements org.codehaus.groovy.ast.Variable.getName.

Doc from org.codehaus.groovy.ast.Variable.getName.

the name of the variable

getOriginTypeback to summary
public ClassNode getOriginType()

Implements org.codehaus.groovy.ast.Variable.getOriginType.

Doc from org.codehaus.groovy.ast.Variable.getOriginType.

the type before wrapping primitives type of the variable

getSetterBlockback to summary
public Statement getSetterBlock()
getTypeback to summary
public ClassNode getType()

Implements org.codehaus.groovy.ast.Variable.getType.

Doc from org.codehaus.groovy.ast.Variable.getType.

the type of the variable

hasInitialExpressionback to summary
public boolean hasInitialExpression()

Implements org.codehaus.groovy.ast.Variable.hasInitialExpression.

Doc from org.codehaus.groovy.ast.Variable.hasInitialExpression.

returns true if there is an initialization expression

isClosureSharedVariableback to summary
public boolean isClosureSharedVariable()

Implements org.codehaus.groovy.ast.Variable.isClosureSharedVariable.

isDynamicTypedback to summary
public boolean isDynamicTyped()

Implements org.codehaus.groovy.ast.Variable.isDynamicTyped.

isInStaticContextback to summary
public boolean isInStaticContext()

Implements org.codehaus.groovy.ast.Variable.isInStaticContext.

Doc from org.codehaus.groovy.ast.Variable.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

isPrivateback to summary
public boolean isPrivate()
isPublicback to summary
public boolean isPublic()
isStaticback to summary
public boolean isStatic()
setClosureSharedVariableback to summary
public void setClosureSharedVariable(boolean inClosure)

Implements org.codehaus.groovy.ast.Variable.setClosureSharedVariable.

Deprecated

not used anymore, has no effect

Annotations
@Deprecated
setFieldback to summary
public void setField(FieldNode fn)
setGetterBlockback to summary
public void setGetterBlock(Statement getterBlock)
setSetterBlockback to summary
public void setSetterBlock(Statement setterBlock)
setTypeback to summary
public void setType(ClassNode t)