org.codehaus.groovy.ast.expr
Class MethodCallExpression

java.lang.Object
  extended byorg.codehaus.groovy.ast.ASTNode
      extended byorg.codehaus.groovy.ast.expr.Expression
          extended byorg.codehaus.groovy.ast.expr.MethodCallExpression

public class MethodCallExpression
extends Expression

A method call on an object or class

Version:
$Revision: 1.4 $
Author:
James Strachan

Field Summary
 
Fields inherited from class org.codehaus.groovy.ast.ASTNode
EMPTY_STRING_ARRAY
 
Constructor Summary
MethodCallExpression(Expression objectExpression, java.lang.String method, Expression arguments)
           
 
Method Summary
 Expression getArguments()
           
 java.lang.String getMethod()
           
 Expression getObjectExpression()
           
 java.lang.String getText()
           
 boolean isImplicitThis()
           
 boolean isSafe()
           
static boolean isSuperMethodCall(MethodCallExpression call)
           
 void setImplicitThis(boolean implicitThis)
           
 void setSafe(boolean safe)
           
 java.lang.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
transformExpressions
 
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

MethodCallExpression

public MethodCallExpression(Expression objectExpression,
                            java.lang.String method,
                            Expression arguments)
Method Detail

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:

getArguments

public Expression getArguments()

getMethod

public java.lang.String getMethod()

getObjectExpression

public Expression getObjectExpression()

getText

public java.lang.String getText()
Overrides:
getText in class ASTNode

isSafe

public boolean isSafe()
Returns:
is this a safe method call, i.e. if true then if the source object is null then this method call will return null rather than throwing a null pointer exception

setSafe

public void setSafe(boolean safe)

isImplicitThis

public boolean isImplicitThis()
Returns:
true if no object expression was specified otherwise if some expression was specified for the object on which to evaluate the method then return false

setImplicitThis

public void setImplicitThis(boolean implicitThis)

toString

public java.lang.String toString()

isSuperMethodCall

public static boolean isSuperMethodCall(MethodCallExpression call)


Copyright © 2003-2004 The Codehaus. All Rights Reserved.