koala.dynamicjava.tree
Class SimpleMethodCall

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
                  extended by koala.dynamicjava.tree.SimpleMethodCall
All Implemented Interfaces:
SourceInfo.Wrapper, StatementExpression

public class SimpleMethodCall
extends MethodCall

This class represents the function call nodes of the syntax tree. For example: "foo(x, y+3)"

Version:
1.0 - 1999/10/18
Author:
Stephane Hillion

Constructor Summary
SimpleMethodCall(Option<java.util.List<TypeName>> targs, java.lang.String mn, java.util.List<Expression> args, SourceInfo si)
          Creates a new node
SimpleMethodCall(java.lang.String mn, java.util.List<Expression> args, SourceInfo si)
          Creates a new node
 
Method Summary
<T> T
acceptVisitor(Visitor<T> visitor)
          Allows a visitor to traverse the tree
 java.lang.String toString()
          Implementation of toString for use in unit testing
 
Methods inherited from class koala.dynamicjava.tree.MethodCall
getArguments, getMethodName, getTypeArgs, setArguments, setMethodName, setTypeArgs, setTypeArgs
 
Methods inherited from class koala.dynamicjava.tree.Node
archiveProperties, getProperties, getProperty, getSourceInfo, hasProperty, setProperty, setSourceInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleMethodCall

public SimpleMethodCall(java.lang.String mn,
                        java.util.List<Expression> args,
                        SourceInfo si)
Creates a new node

Parameters:
mn - the function name
args - the arguments. Can be null.
Throws:
java.lang.IllegalArgumentException - if mn is null

SimpleMethodCall

public SimpleMethodCall(Option<java.util.List<TypeName>> targs,
                        java.lang.String mn,
                        java.util.List<Expression> args,
                        SourceInfo si)
Creates a new node

Parameters:
targs - type arguments
mn - the function name
args - the arguments. Can be null.
Throws:
java.lang.IllegalArgumentException - if mn is null
Method Detail

acceptVisitor

public <T> T acceptVisitor(Visitor<T> visitor)
Allows a visitor to traverse the tree

Specified by:
acceptVisitor in class Node
Parameters:
visitor - the visitor to accept

toString

public java.lang.String toString()
Implementation of toString for use in unit testing

Overrides:
toString in class java.lang.Object