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

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

    class MethodCallExpression
    extends Expression

A method call on an object or class

author:
  James Strachan

version:
  $Revision: 13712 $

Field Summary
`static Expression` | `NO_ARGUMENTS`

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

Method Summary
`Expression` | `getArguments()`
`MetaMethod` | `getMetaMethod()`
`Expression` | `getMethod()`
`String` | `getMethodAsString()` This method returns the method name as String if it is no dynamic calculated method name, but a constant.
`Expression` | `getObjectExpression()`
`String` | `getText()`
`boolean` | `isImplicitThis()` some expression was specified for the object on which to evaluate the method then return false
`boolean` | `isSafe()` then this method call will return null rather than throwing a null pointer exception
`boolean` | `isSpreadSafe()`
`void` | `setArguments(Expression arguments)`
`void` | `setImplicitThis(boolean implicitThis)`
`void` | `setMetaMethod(MetaMethod mmeth)`
`void` | `setMethod(Expression method)`
`void` | `setObjectExpression(Expression objectExpression)`
`void` | `setSafe(boolean safe)`
`void` | `setSpreadSafe(boolean value)`
`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, isSynthetic, setDeclaringClass, setSynthetic

Methods inherited from class ASTNode
getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setSourcePosition, visit

Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll

Field Detail

### NO_ARGUMENTS

    static final Expression NO_ARGUMENTS

Constructor Detail

### MethodCallExpression

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

### MethodCallExpression

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

Method Detail

### getArguments

    public Expression getArguments()

### getMetaMethod

    public MetaMethod getMetaMethod()

  deprecated:

### getMethod

    public Expression getMethod()

### getMethodAsString

    public String getMethodAsString()

  This method returns the method name as String if it is no dynamic calculated method name, but a constant.

### getObjectExpression

    public Expression getObjectExpression()

### getText

    public String getText()

### isImplicitThis

    public boolean isImplicitThis()

  return:
    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

### isSafe

    public 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

### isSpreadSafe

    public boolean isSpreadSafe()

### setArguments

    public void setArguments(Expression arguments)

### setImplicitThis

    public void setImplicitThis(boolean implicitThis)

### setMetaMethod

    public void setMetaMethod(MetaMethod mmeth)

  deprecated:

### setMethod

    public void setMethod(Expression method)

### setObjectExpression

    public void setObjectExpression(Expression objectExpression)

### setSafe

    public void setSafe(boolean safe)

### setSpreadSafe

    public void setSpreadSafe(boolean value)

### toString

    public String toString()

### transformExpression

    public Expression transformExpression(ExpressionTransformer transformer)

### visit

    public void visit(GroovyCodeVisitor visitor)

Copyright © 2003-2009 The Codehaus. All rights reserved.