koala.dynamicjava.tree
Class StaticMethodCall

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

public class StaticMethodCall
extends MethodCall

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

Version:
1.0 - 1999/05/01
Author:
Stephane Hillion

Constructor Summary
StaticMethodCall(TypeName typ, Option<java.util.List<TypeName>> targs, java.lang.String mn, java.util.List<? extends Expression> args)
          Creates a new node.
StaticMethodCall(TypeName typ, Option<java.util.List<TypeName>> targs, java.lang.String mn, java.util.List<? extends Expression> args, SourceInfo si)
          Creates a new node
StaticMethodCall(TypeName typ, java.lang.String mn, java.util.List<? extends Expression> args)
          Creates a new node.
StaticMethodCall(TypeName typ, 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
 TypeName getMethodType()
          Returns the type on which this method call applies
 void setMethodType(ReferenceTypeName t)
          Sets the declaring type of the method
 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

StaticMethodCall

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

Parameters:
typ - the type on which this method call applies
targs - type arguments
mn - the field name
args - the arguments. Can be null.
Throws:
java.lang.IllegalArgumentException - if typ is null or mn is null

StaticMethodCall

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

Parameters:
typ - the type on which this method call applies
mn - the field name
args - the arguments. Can be null.
Throws:
java.lang.IllegalArgumentException - if typ is null or mn is null

StaticMethodCall

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

Parameters:
typ - the type on which this method call applies
targs - type arguments
mn - the field name
args - the arguments. Can be null.
Throws:
java.lang.IllegalArgumentException - if typ is null or mn is null

StaticMethodCall

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

Parameters:
typ - the type on which this method call applies
mn - the field name
args - the arguments. Can be null.
Throws:
java.lang.IllegalArgumentException - if typ is null or mn is null
Method Detail

getMethodType

public TypeName getMethodType()
Returns the type on which this method call applies


setMethodType

public void setMethodType(ReferenceTypeName t)
Sets the declaring type of the method

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

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