org.codehaus.groovy.ast.expr
Class MethodCallExpression
java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.expr.Expression
org.codehaus.groovy.ast.expr.MethodCallExpression
- public class MethodCallExpression
- extends Expression
A method call on an object or class
- Version:
- $Revision: 1.7 $
- Author:
- James Strachan
Methods inherited from class org.codehaus.groovy.ast.expr.Expression |
getFailure, getType, getTypeClass, isDynamic, isResolveFailed, isTypeResolved, resolve, setFailure, setResolveFailed, setType, setTypeClass, setTypeResolved, shouldContinue, transformExpressions |
MethodCallExpression
public MethodCallExpression(Expression objectExpression,
String method,
Expression arguments)
getMetaMethod
public MetaMethod getMetaMethod()
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:
resolveType
protected void resolveType(AsmClassGenerator resolver)
- Specified by:
resolveType
in class Expression
getArguments
public Expression getArguments()
getMethod
public String getMethod()
getObjectExpression
public Expression getObjectExpression()
getText
public 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)
isSpreadSafe
public boolean isSpreadSafe()
setSpreadSafe
public void setSpreadSafe(boolean value)
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 String toString()
isSuperMethodCall
public static boolean isSuperMethodCall(MethodCallExpression call)
setMethod
public void setMethod(MetaMethod mmeth)
Copyright © 2003-2005 The Codehaus. All Rights Reserved.