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, transformExpressions
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition
public 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)
Expression
transformExpression
in class Expression
public Expression getArguments()
getArguments
in interface MethodCall
public void setArguments(Expression arguments)
public Expression getMethod()
public void setMethod(Expression method)
public ASTNode getReceiver()
getReceiver
in interface MethodCall
public String getMethodAsString()
getMethodAsString
in interface MethodCall
public void setObjectExpression(Expression objectExpression)
public Expression getObjectExpression()
public 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()