koala.dynamicjava.tree
Class ObjectMethodCall

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.ObjectMethodCall
All Implemented Interfaces:
ExpressionContainer, SourceInfo.Wrapper, StatementExpression

public class ObjectMethodCall
extends MethodCall
implements ExpressionContainer

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

Version:
1.0 - 1999/04/24
Author:
Stephane Hillion

Field Summary
 
Fields inherited from interface koala.dynamicjava.tree.ExpressionContainer
EXPRESSION
 
Constructor Summary
ObjectMethodCall(Expression exp, Option<java.util.List<TypeName>> targs, java.lang.String mn, java.util.List<? extends Expression> args)
          Creates a new node
ObjectMethodCall(Expression exp, Option<java.util.List<TypeName>> targs, java.lang.String mn, java.util.List<? extends Expression> args, SourceInfo si)
          Creates a new node
ObjectMethodCall(Expression exp, java.lang.String mn, java.util.List<? extends Expression> args)
          Creates a new node
ObjectMethodCall(Expression exp, java.lang.String mn, java.util.List<? extends Expression> args, SourceInfo si)
          Creates a new node
 
Method Summary
<T> T
acceptVisitor(Visitor<T> visitor)
          Allows a visitor to traverse the tree
 Expression getExpression()
          Returns the expression on which this method call applies
 void setExpression(Expression e)
          Sets the expression on which this method call applies
 java.lang.String toString()
           
 java.lang.String toStringHelper()
          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

ObjectMethodCall

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

Parameters:
exp - the expression on which this method call applies
targs - type arguments
mn - the field name
args - the arguments. Can be null.

ObjectMethodCall

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

Parameters:
exp - the expression on which this method call applies
mn - the field name
args - the arguments. Can be null.

ObjectMethodCall

public ObjectMethodCall(Expression exp,
                        Option<java.util.List<TypeName>> targs,
                        java.lang.String mn,
                        java.util.List<? extends Expression> args)
Creates a new node

Parameters:
exp - the expression on which this method call applies
targs - type arguments
mn - the field name
args - the arguments. Can be null.

ObjectMethodCall

public ObjectMethodCall(Expression exp,
                        java.lang.String mn,
                        java.util.List<? extends Expression> args)
Creates a new node

Parameters:
exp - the expression on which this method call applies
mn - the field name
args - the arguments. Can be null.
Method Detail

getExpression

public Expression getExpression()
Returns the expression on which this method call applies

Specified by:
getExpression in interface ExpressionContainer

setExpression

public void setExpression(Expression e)
Sets the expression on which this method call applies

Specified by:
setExpression in interface ExpressionContainer

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()
Overrides:
toString in class java.lang.Object

toStringHelper

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