org.codehaus.groovy.ast.expr
Class PropertyExpression

java.lang.Object
  |
  +--org.codehaus.groovy.ast.ASTNode
        |
        +--org.codehaus.groovy.ast.expr.Expression
              |
              +--org.codehaus.groovy.ast.expr.PropertyExpression

public class PropertyExpression
extends Expression

Represents a property access such as the expression "foo.bar".

Version:
$Revision: 1.2 $
Author:
James Strachan

Field Summary
 
Fields inherited from class org.codehaus.groovy.ast.ASTNode
EMPTY_STRING_ARRAY
 
Constructor Summary
PropertyExpression(org.codehaus.groovy.ast.expr.Expression objectExpression, String property)
           
PropertyExpression(org.codehaus.groovy.ast.expr.Expression objectExpression, String property, boolean safe)
           
 
Method Summary
 org.codehaus.groovy.ast.expr.Expression getObjectExpression()
           
 String getProperty()
           
 String getText()
           
 boolean isSafe()
           
 String toString()
           
 void visit(org.codehaus.groovy.ast.GroovyCodeVisitor visitor)
           
 
Methods inherited from class org.codehaus.groovy.ast.ASTNode
getColumnNumber, getLineNumber, setColumnNumber, setCSTNode, setLineNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyExpression

public PropertyExpression(org.codehaus.groovy.ast.expr.Expression objectExpression,
                          String property)

PropertyExpression

public PropertyExpression(org.codehaus.groovy.ast.expr.Expression objectExpression,
                          String property,
                          boolean safe)
Method Detail

visit

public void visit(org.codehaus.groovy.ast.GroovyCodeVisitor visitor)
Overrides:
visit in class ASTNode

getObjectExpression

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003 The Codehaus. All Rights Reserved.