org.codehaus.groovy.ast.expr
Class AttributeExpression
java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.expr.Expression
org.codehaus.groovy.ast.expr.AttributeExpression
- public class AttributeExpression
- extends Expression
Represents an attribute access (accessing the field of a class) such as the expression "foo.@bar".
- Version:
- $Revision: 1.4 $
- Author:
- James Strachan
AttributeExpression
public AttributeExpression(Expression objectExpression,
String property)
AttributeExpression
public AttributeExpression(Expression objectExpression,
String property,
boolean safe)
isStatic
public boolean isStatic()
visit
public void visit(GroovyCodeVisitor visitor)
- Overrides:
visit
in class ASTNode
transformExpression
public Expression transformExpression(ExpressionTransformer transformer)
- Description copied from class:
Expression
- Return a copy of the expression calling the transformer on any nested expressions
- Specified by:
transformExpression
in class Expression
- Parameters:
transformer
-
- Returns:
getObjectExpression
public Expression getObjectExpression()
getProperty
public String getProperty()
getText
public String getText()
- Overrides:
getText
in class ASTNode
isSafe
public boolean isSafe()
- Returns:
- is this a safe navigation, i.e. if true then if the source object is null
then this navigation will return null
isSpreadSafe
public boolean isSpreadSafe()
setSpreadSafe
public void setSpreadSafe(boolean value)
toString
public String toString()
setStatic
public void setStatic(boolean aStatic)
getGetter
public Method getGetter()
getSetter
public Method getSetter()
getField
public Field getField()
setAccess
public void setAccess(int access)
getAccess
public int getAccess()
Copyright © 2003-2007 The Codehaus. All Rights Reserved.