koala.dynamicjava.tree
Class MethodCall

java.lang.Object
  extended by koala.dynamicjava.tree.Node
      extended by koala.dynamicjava.tree.Expression
          extended by koala.dynamicjava.tree.PrimaryExpression
              extended by koala.dynamicjava.tree.MethodCall
All Implemented Interfaces:
SourceInfo.Wrapper, StatementExpression
Direct Known Subclasses:
ObjectMethodCall, SimpleMethodCall, StaticMethodCall, SuperMethodCall

public abstract class MethodCall
extends PrimaryExpression
implements StatementExpression

An abstract parent for all method calls. Concrete implementations include:


Constructor Summary
protected MethodCall(Option<java.util.List<TypeName>> targs, java.lang.String mn, java.util.List<? extends Expression> args, SourceInfo si)
          Creates a new node
 
Method Summary
 java.util.List<Expression> getArguments()
          Returns the arguments.
 java.lang.String getMethodName()
          Returns the method name
 Option<java.util.List<TypeName>> getTypeArgs()
           
 void setArguments(java.util.List<? extends Expression> l)
          Sets the constructor arguments.
 void setMethodName(java.lang.String s)
          Sets the method name
 void setTypeArgs(java.util.List<TypeName> targs)
           
 void setTypeArgs(Option<java.util.List<TypeName>> targs)
           
 
Methods inherited from class koala.dynamicjava.tree.Node
acceptVisitor, archiveProperties, getProperties, getProperty, getSourceInfo, hasProperty, setProperty, setSourceInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodCall

protected MethodCall(Option<java.util.List<TypeName>> targs,
                     java.lang.String mn,
                     java.util.List<? extends Expression> args,
                     SourceInfo si)
Creates a new node

Parameters:
mn - the field name
args - the arguments. null if no arguments.
Throws:
java.lang.IllegalArgumentException - if mn is null
Method Detail

getTypeArgs

public Option<java.util.List<TypeName>> getTypeArgs()

setTypeArgs

public void setTypeArgs(java.util.List<TypeName> targs)

setTypeArgs

public void setTypeArgs(Option<java.util.List<TypeName>> targs)

getMethodName

public java.lang.String getMethodName()
Returns the method name


setMethodName

public void setMethodName(java.lang.String s)
Sets the method name

Throws:
java.lang.IllegalArgumentException - if s is null

getArguments

public java.util.List<Expression> getArguments()
Returns the arguments.

Returns:
null if there is no argument

setArguments

public void setArguments(java.util.List<? extends Expression> l)
Sets the constructor arguments.