net.sf.transjvm
Class MethodID

java.lang.Object
  extended by net.sf.transjvm.MemberID
      extended by net.sf.transjvm.MethodID

public abstract class MethodID
extends MemberID

A class representing a method identifier.


Method Summary
static MethodID _interface(TypeID enclosing, TypeID returnType, java.lang.String name)
          Returns a MethodID for interface dispatch, with no parameters.
static MethodID _interface(TypeID enclosing, TypeID returnType, java.lang.String name, TypeID... params)
          Returns a MethodID for interface dispatch, with several parameters.
static MethodID _interface(TypeID enclosing, TypeID returnType, java.lang.String name, TypeID param)
          Returns a MethodID for interface dispatch, with one parameter.
static MethodID _interface(TypeID enclosing, TypeID returnType, java.lang.String name, TypeID param0, TypeID param1)
          Returns a MethodID for interface dispatch, with two parameters.
static MethodID _static(TypeID enclosing, TypeID returnType, java.lang.String name)
          Returns a MethodID for static dispatch, with no parameters.
static MethodID _static(TypeID enclosing, TypeID returnType, java.lang.String name, TypeID... params)
          Returns a MethodID for static dispatch, with several parameters.
static MethodID _static(TypeID enclosing, TypeID returnType, java.lang.String name, TypeID param)
          Returns a MethodID for static dispatch, with one parameter.
static MethodID _static(TypeID enclosing, TypeID returnType, java.lang.String name, TypeID param0, TypeID param1)
          Returns a MethodID for static dispatch, with two parameters.
 Expression call(Expression object)
          Returns a call expression with no arguments.
 Expression call(Expression object, Expression... arguments)
          Returns a call expression with one or more arguments.
 boolean equals(java.lang.Object o)
           
 java.lang.String getName()
          Returns the name of this MethodID.
 TypeID[] getParameters()
          Returns the parameter types of this method.
abstract  MethodID getProxy(TypeID proxyHolder)
           
 TypeID getReturnType()
           
 int hashCode()
           
static MethodID virtual(TypeID enclosing, TypeID returnType, java.lang.String name)
          Returns a MethodID for virtual dispatch, with no parameters.
static MethodID virtual(TypeID enclosing, TypeID returnType, java.lang.String name, TypeID... params)
          Returns a MethodID for virtual dispatch, with several parameters.
static MethodID virtual(TypeID enclosing, TypeID returnType, java.lang.String name, TypeID param)
          Returns a MethodID for virtual dispatch, with one parameter.
static MethodID virtual(TypeID enclosing, TypeID returnType, java.lang.String name, TypeID param0, TypeID param1)
          Returns a MethodID for virtual dispatch, with two parameters.
 
Methods inherited from class net.sf.transjvm.MemberID
getOwningClass, getRef
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in class MemberID

hashCode

public int hashCode()
Specified by:
hashCode in class MemberID

getName

public java.lang.String getName()
Returns the name of this MethodID.

Returns:
The name of this MethodID.

getProxy

public abstract MethodID getProxy(TypeID proxyHolder)

getReturnType

public TypeID getReturnType()

getParameters

public TypeID[] getParameters()
Returns the parameter types of this method. Warning: This method is provided for verification purposes, not for code generation and is slow.


virtual

public static MethodID virtual(TypeID enclosing,
                               TypeID returnType,
                               java.lang.String name)
Returns a MethodID for virtual dispatch, with no parameters.

Parameters:
enclosing - Class enclosing this method.
name - Name of this method.
returnType - Return type of this method.

virtual

public static MethodID virtual(TypeID enclosing,
                               TypeID returnType,
                               java.lang.String name,
                               TypeID param)
Returns a MethodID for virtual dispatch, with one parameter.

Parameters:
enclosing - Class enclosing this method.
name - Name of this method.
param - Parameter type of this method.
returnType - Return type of this method.

virtual

public static MethodID virtual(TypeID enclosing,
                               TypeID returnType,
                               java.lang.String name,
                               TypeID param0,
                               TypeID param1)
Returns a MethodID for virtual dispatch, with two parameters.

Parameters:
enclosing - Class enclosing this method.
name - Name of this method.
param0 - First parameter type of this method.
param1 - Second parameter type of this method.
returnType - Return type of this method.

virtual

public static MethodID virtual(TypeID enclosing,
                               TypeID returnType,
                               java.lang.String name,
                               TypeID... params)
Returns a MethodID for virtual dispatch, with several parameters.

Parameters:
enclosing - Class enclosing this method id.
name - Name of this method id.
params - Parameter types of this method id.
returnType - Return type of this method id.

_static

public static MethodID _static(TypeID enclosing,
                               TypeID returnType,
                               java.lang.String name)
Returns a MethodID for static dispatch, with no parameters.

Parameters:
enclosing - Class enclosing this method.
name - Name of this method.
returnType - Return type of this method.

_static

public static MethodID _static(TypeID enclosing,
                               TypeID returnType,
                               java.lang.String name,
                               TypeID param)
Returns a MethodID for static dispatch, with one parameter.

Parameters:
enclosing - Class enclosing this method.
name - Name of this method.
param - Parameter type of this method.
returnType - Return type of this method.

_static

public static MethodID _static(TypeID enclosing,
                               TypeID returnType,
                               java.lang.String name,
                               TypeID param0,
                               TypeID param1)
Returns a MethodID for static dispatch, with two parameters.

Parameters:
enclosing - Class enclosing this method.
name - Name of this method.
param0 - First parameter type of this method.
param1 - Second parameter type of this method.
returnType - Return type of this method.

_static

public static MethodID _static(TypeID enclosing,
                               TypeID returnType,
                               java.lang.String name,
                               TypeID... params)
Returns a MethodID for static dispatch, with several parameters.

Parameters:
enclosing - Class enclosing this method id.
name - Name of this method id.
params - Parameter types of this method id.
returnType - Return type of this method id.

_interface

public static MethodID _interface(TypeID enclosing,
                                  TypeID returnType,
                                  java.lang.String name)
Returns a MethodID for interface dispatch, with no parameters.

Parameters:
enclosing - Class enclosing this method.
name - Name of this method.
returnType - Return type of this method.

_interface

public static MethodID _interface(TypeID enclosing,
                                  TypeID returnType,
                                  java.lang.String name,
                                  TypeID param)
Returns a MethodID for interface dispatch, with one parameter.

Parameters:
enclosing - Class enclosing this method.
name - Name of this method.
param - Parameter type of this method.
returnType - Return type of this method.

_interface

public static MethodID _interface(TypeID enclosing,
                                  TypeID returnType,
                                  java.lang.String name,
                                  TypeID param0,
                                  TypeID param1)
Returns a MethodID for interface dispatch, with two parameters.

Parameters:
enclosing - Class enclosing this method.
name - Name of this method.
param0 - First parameter type of this method.
param1 - Second parameter type of this method.
returnType - Return type of this method.

_interface

public static MethodID _interface(TypeID enclosing,
                                  TypeID returnType,
                                  java.lang.String name,
                                  TypeID... params)
Returns a MethodID for interface dispatch, with several parameters.

Parameters:
enclosing - Class enclosing this method id.
name - Name of this method id.
params - Parameter types of this method id.
returnType - Return type of this method id.

call

public Expression call(Expression object)
Returns a call expression with no arguments.

Parameters:
object - The object owning the method, ignored if method is static.
Returns:
A call expression with one argument.
Throws:
java.lang.NullPointerException - If object is null and method is non-static.

call

public Expression call(Expression object,
                       Expression... arguments)
Returns a call expression with one or more arguments.

Parameters:
object - The object owning the method, ignored if method is static.
arguments - The arguments.
Returns:
A call expression with one or more arguments.
Throws:
java.lang.NullPointerException - If object is null and method is non-static.


Copyright 2004-5, Mark Shannon