public class MethodCallExpression extends Expression
A method call on an object or class.
Modifiers | Name | Description |
---|---|---|
static Expression |
NO_ARGUMENTS |
Fields inherited from class | Fields |
---|---|
class Expression |
EMPTY_ARRAY |
Constructor and description |
---|
MethodCallExpression
(Expression objectExpression, String method, Expression arguments) |
MethodCallExpression
(Expression objectExpression, Expression method, Expression arguments) |
Type Params | Return Type | Name and description |
---|---|---|
|
TupleExpression |
addExpression(Expression e) |
|
Expression |
getArguments() |
|
List<Expression> |
getExpressions() |
|
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 |
setSourcePosition(ASTNode node) |
|
void |
setSpreadSafe(boolean value) |
|
String |
toString() |
|
Expression |
transformExpression(ExpressionTransformer transformer) |
|
void |
visit(GroovyCodeVisitor visitor) |
Methods inherited from class | Name |
---|---|
class Expression |
getType, setType, transformExpression, transformExpressions, transformExpressions |
class AnnotatedNode |
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic |
class ASTNode |
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, hashCode, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit |
This method returns the method name as String if it is no dynamic calculated method name, but a constant.
Sets a method call target for a direct method call. WARNING: A method call made this way will run outside of the MOP!
mn
- the target as MethodNode, mn==null means no targetCopyright © 2003-2020 The Apache Software Foundation. All rights reserved.