org.codehaus.groovy.ast.expr
Class AttributeExpression

java.lang.Object
  extended byorg.codehaus.groovy.ast.ASTNode
      extended byorg.codehaus.groovy.ast.expr.Expression
          extended byorg.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

Constructor Summary
AttributeExpression(Expression objectExpression, String property)
           
AttributeExpression(Expression objectExpression, String property, boolean safe)
           
 
Method Summary
 int getAccess()
           
 Field getField()
           
 Method getGetter()
           
 Expression getObjectExpression()
           
 String getProperty()
           
 Method getSetter()
           
 String getText()
           
 boolean isSafe()
           
 boolean isSpreadSafe()
           
 boolean isStatic()
           
 void setAccess(int access)
           
 void setSpreadSafe(boolean value)
           
 void setStatic(boolean aStatic)
           
 String toString()
           
 Expression transformExpression(ExpressionTransformer transformer)
          Return a copy of the expression calling the transformer on any nested expressions
 void visit(GroovyCodeVisitor visitor)
           
 
Methods inherited from class org.codehaus.groovy.ast.expr.Expression
getType, setType, transformExpressions
 
Methods inherited from class org.codehaus.groovy.ast.ASTNode
getColumnNumber, getLineNumber, setColumnNumber, setLineNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeExpression

public AttributeExpression(Expression objectExpression,
                           String property)

AttributeExpression

public AttributeExpression(Expression objectExpression,
                           String property,
                           boolean safe)
Method Detail

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.