Package org.codehaus.groovy.ast.expr
Class MethodCallExpression
java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.AnnotatedNode
org.codehaus.groovy.ast.expr.Expression
org.codehaus.groovy.ast.expr.MethodCallExpression
- All Implemented Interfaces:
- GroovydocHolder<AnnotatedNode>,- MethodCall,- NodeMetaDataHandler
A method call on an object or class.
- 
Field SummaryFieldsFields inherited from class org.codehaus.groovy.ast.expr.ExpressionEMPTY_ARRAYFields inherited from interface groovy.lang.groovydoc.GroovydocHolderDOC_COMMENT
- 
Constructor SummaryConstructorsConstructorDescriptionMethodCallExpression(Expression objectExpression, String method, Expression arguments) MethodCallExpression(Expression objectExpression, Expression method, Expression arguments) 
- 
Method SummaryModifier and TypeMethodDescriptionThis method returns the method name as String if it is no dynamic calculated method name, but a constant.getText()booleanbooleanisSafe()booleanbooleanvoidsetArguments(Expression arguments) voidsetGenericsTypes(GenericsType[] genericsTypes) voidsetImplicitThis(boolean implicitThis) voidsetMethod(Expression method) voidSets a method call target for a direct method call.voidsetObjectExpression(Expression objectExpression) voidsetSafe(boolean safe) voidsetSourcePosition(ASTNode node) Sets the source position using another ASTNode.voidsetSpreadSafe(boolean value) toString()transformExpression(ExpressionTransformer transformer) Return a copy of the expression calling the transformer on any nested expressionsvoidvisit(GroovyCodeVisitor visitor) Methods inherited from class org.codehaus.groovy.ast.expr.ExpressiongetType, setType, transformExpressions, transformExpressionsMethods inherited from class org.codehaus.groovy.ast.AnnotatedNodeaddAnnotation, addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSyntheticMethods inherited from class org.codehaus.groovy.ast.ASTNodecopyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMapMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandlercopyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, putNodeMetaData, removeNodeMetaData, setNodeMetaData
- 
Field Details- 
NO_ARGUMENTS
 
- 
- 
Constructor Details- 
MethodCallExpression
- 
MethodCallExpression
 
- 
- 
Method Details- 
visit
- 
transformExpressionDescription copied from class:ExpressionReturn a copy of the expression calling the transformer on any nested expressions- Specified by:
- transformExpressionin class- Expression
 
- 
getArguments- Specified by:
- getArgumentsin interface- MethodCall
 
- 
setArguments
- 
getMethod
- 
setMethod
- 
getMethodAsStringThis method returns the method name as String if it is no dynamic calculated method name, but a constant.- Specified by:
- getMethodAsStringin interface- MethodCall
 
- 
getObjectExpression
- 
setObjectExpression
- 
getReceiver- Specified by:
- getReceiverin interface- MethodCall
 
- 
getText- Specified by:
- getTextin interface- MethodCall
- Overrides:
- getTextin class- ASTNode
 
- 
isSafepublic 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
 
- 
setSafepublic void setSafe(boolean safe) 
- 
isSpreadSafepublic boolean isSpreadSafe()
- 
setSpreadSafepublic void setSpreadSafe(boolean value) 
- 
isImplicitThispublic 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
 
- 
setImplicitThispublic void setImplicitThis(boolean implicitThis) 
- 
getGenericsTypes
- 
setGenericsTypes
- 
isUsingGenericspublic boolean isUsingGenerics()
- 
getMethodTarget- Returns:
- the target as method node if set
 
- 
setMethodTargetSets a method call target for a direct method call. WARNING: A method call made this way will run outside of the MOP!- Parameters:
- mn- the target as MethodNode, mn==null means no target
 
- 
setSourcePositionDescription copied from class:ASTNodeSets the source position using another ASTNode. The sourcePosition consists of a line/column pair for the start and a line/column pair for the end of the expression or statement- Overrides:
- setSourcePositionin class- ASTNode
- Parameters:
- node- - the node used to configure the position information
 
- 
toString
 
-