net.sf.transjvm
Class ConstructorID

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

public class ConstructorID
extends MemberID

This class is used for referencing constructors.

Author:
Mark Shannon

Constructor Summary
ConstructorID(TypeID type)
          Creates a ConstructorID with no parameters.
ConstructorID(TypeID type, TypeID... params)
          Creates a ConstructorID with any number of parameters.
ConstructorID(TypeID type, TypeID param)
          Creates a ConstructorID with one parameter.
ConstructorID(TypeID type, TypeID param0, TypeID param1)
          Creates a ConstructorID with two parameters.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 TypeID[] getParameters()
          Returns the parameter types of this constructor Warning: This method is provided for verification purposes, not for code generation and is slow.
 int hashCode()
           
 Expression newInstance()
          Creates a new Object and invokes this constructor no arguments.
 Expression newInstance(Expression... arguments)
          Creates a new Object and invokes this constructor with several arguments.
 
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
 

Constructor Detail

ConstructorID

public ConstructorID(TypeID type)
Creates a ConstructorID with no parameters.

Parameters:
type - The class to be constructed

ConstructorID

public ConstructorID(TypeID type,
                     TypeID param)
Creates a ConstructorID with one parameter.

Parameters:
type - The class to be constructed
param - The parameter

ConstructorID

public ConstructorID(TypeID type,
                     TypeID param0,
                     TypeID param1)
Creates a ConstructorID with two parameters.

Parameters:
type - The class to be constructed
param0 - The first parameter
param1 - The second parameter

ConstructorID

public ConstructorID(TypeID type,
                     TypeID... params)
Creates a ConstructorID with any number of parameters.

Parameters:
type - Description of the Parameter
params - Parameters of this constructor.
Method Detail

getParameters

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


equals

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

hashCode

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

newInstance

public Expression newInstance()
Creates a new Object and invokes this constructor no arguments.

Returns:
An expression representing the new object.

newInstance

public Expression newInstance(Expression... arguments)
Creates a new Object and invokes this constructor with several arguments.

Parameters:
arguments - Arguments for the constructor.
Returns:
An expression representing the new object.


Copyright 2004-5, Mark Shannon