Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.ast.expr
[Java] 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

    public class MethodCallExpression
    extends Expression

A method call on an object or class

Authors:
  James Strachan

Version:
  \$Revision\$

Field Summary
`static Expression` | `NO_ARGUMENTS`

Constructor Summary
`MethodCallExpression(Expression objectExpression, java.lang.String method, Expression arguments)`
`MethodCallExpression(Expression objectExpression, Expression method, Expression arguments)`

Method Summary
`Expression` | `getArguments()`
`GenericsType[]` | `getGenericsTypes()`
`Expression` | `getMethod()`
`java.lang.String` | `getMethodAsString()`
`MethodNode` | `getMethodTarget()` @return the target as method node if set
`Expression` | `getObjectExpression()`
`java.lang.String` | `getText()`
`boolean` | `isImplicitThis()`
`boolean` | `isSafe()` @return 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
`boolean` | `isSpreadSafe()`
`boolean` | `isUsingGenerics()`
`void` | `setArguments(Expression arguments)`
`void` | `setGenericsTypes(GenericsType[] genericsTypes)`
`void` | `setImplicitThis(boolean implicitThis)`
`void` | `setMethod(Expression method)`
`void` | `setMethodTarget(MethodNode mn)`
`void` | `setObjectExpression(Expression objectExpression)`
`void` | `setSafe(boolean safe)`
`void` | `setSpreadSafe(boolean value)`
`java.lang.String` | `toString()`
`Expression` | `transformExpression(ExpressionTransformer transformer)`
`void` | `visit(GroovyCodeVisitor visitor)`

Methods inherited from class Expression
getType, setType, transformExpression, transformExpressions, transformExpressions

Methods inherited from class AnnotatedNode
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic

Methods inherited from class ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getNodeMetaData, getText, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition, visit

Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Field Detail

### NO_ARGUMENTS

    public static final Expression NO_ARGUMENTS

Constructor Detail

### MethodCallExpression

    public MethodCallExpression(Expression objectExpression, java.lang.String method, Expression arguments)

### MethodCallExpression

    public MethodCallExpression(Expression objectExpression, Expression method, Expression arguments)

Method Detail

### getArguments

    public Expression getArguments()

### getGenericsTypes

    public GenericsType[] getGenericsTypes()

### getMethod

    public Expression getMethod()

### getMethodAsString

    public java.lang.String getMethodAsString()

### getMethodTarget

    public MethodNode getMethodTarget()

  Returns:
    the target as method node if set

### getObjectExpression

    public Expression getObjectExpression()

### getText

    public java.lang.String getText()

### isImplicitThis

    public boolean isImplicitThis()

### 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

### isSpreadSafe

    public boolean isSpreadSafe()

### isUsingGenerics

    public boolean isUsingGenerics()

### setArguments

    public void setArguments(Expression arguments)

### setGenericsTypes

    public void setGenericsTypes(GenericsType[] genericsTypes)

### setImplicitThis

    public void setImplicitThis(boolean implicitThis)

### setMethod

    public void setMethod(Expression method)

### setMethodTarget

    public void setMethodTarget(MethodNode mn)

### setObjectExpression

    public void setObjectExpression(Expression objectExpression)

### setSafe

    public void setSafe(boolean safe)

### setSpreadSafe

    public void setSpreadSafe(boolean value)

### toString

    public java.lang.String toString()

### transformExpression

    public Expression transformExpression(ExpressionTransformer transformer)

### visit

    public void visit(GroovyCodeVisitor visitor)

Groovy Documentation