public class MethodCallExpression extends Expression implements MethodCall
| Modifier and Type | Field and Description |
|---|---|
static Expression |
NO_ARGUMENTS |
| Constructor and Description |
|---|
MethodCallExpression(Expression objectExpression,
Expression method,
Expression arguments) |
MethodCallExpression(Expression objectExpression,
String method,
Expression arguments) |
| Modifier and Type | Method and Description |
|---|---|
Expression |
getArguments() |
GenericsType[] |
getGenericsTypes() |
Expression |
getMethod() |
String |
getMethodAsString()
This method returns the method name as String if it is no dynamic
calculated method name, but a constant.
|
MethodNode |
getMethodTarget() |
Expression |
getObjectExpression() |
ASTNode |
getReceiver() |
String |
getText() |
boolean |
isImplicitThis() |
boolean |
isSafe() |
boolean |
isSpreadSafe() |
boolean |
isUsingGenerics() |
void |
setArguments(Expression arguments) |
void |
setGenericsTypes(GenericsType[] genericsTypes) |
void |
setImplicitThis(boolean implicitThis) |
void |
setMethod(Expression method) |
void |
setMethodTarget(MethodNode mn)
Sets a method call target for a direct method call.
|
void |
setObjectExpression(Expression objectExpression) |
void |
setSafe(boolean safe) |
void |
setSpreadSafe(boolean value) |
String |
toString() |
Expression |
transformExpression(ExpressionTransformer transformer)
Return a copy of the expression calling the transformer on any nested expressions
|
void |
visit(GroovyCodeVisitor visitor) |
getType, setType, transformExpressions, transformExpressionsaddAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSyntheticcopyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePositionpublic static final Expression NO_ARGUMENTS
public MethodCallExpression(Expression objectExpression, String method, Expression arguments)
public MethodCallExpression(Expression objectExpression, Expression method, Expression arguments)
public void visit(GroovyCodeVisitor visitor)
public Expression transformExpression(ExpressionTransformer transformer)
ExpressiontransformExpression in class Expressionpublic Expression getArguments()
getArguments in interface MethodCallpublic void setArguments(Expression arguments)
public Expression getMethod()
public void setMethod(Expression method)
public ASTNode getReceiver()
getReceiver in interface MethodCallpublic String getMethodAsString()
getMethodAsString in interface MethodCallpublic void setObjectExpression(Expression objectExpression)
public Expression getObjectExpression()
public String getText()
getText in interface MethodCallgetText in class ASTNodepublic boolean isSafe()
public void setSafe(boolean safe)
public boolean isSpreadSafe()
public void setSpreadSafe(boolean value)
public boolean isImplicitThis()
public void setImplicitThis(boolean implicitThis)
public GenericsType[] getGenericsTypes()
public void setGenericsTypes(GenericsType[] genericsTypes)
public boolean isUsingGenerics()
public void setMethodTarget(MethodNode mn)
mn - the target as MethodNode, mn==null means no targetpublic MethodNode getMethodTarget()