Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

openjava.mop
Class OJConstructor  view OJConstructor download OJConstructor.java

java.lang.Object
  extended byopenjava.mop.OJConstructor
All Implemented Interfaces:
OJMember

public final class OJConstructor
extends java.lang.Object
implements OJMember


Field Summary
private  OJConstructorImp substance
           
private static java.util.Hashtable table
           
 
Fields inherited from interface openjava.mop.OJMember
DECLARED, PUBLIC
 
Constructor Summary
(package private) OJConstructor(java.lang.reflect.Constructor m)
           
  OJConstructor(Environment env, OJClass declarer, openjava.ptree.ConstructorDeclaration d)
           
  OJConstructor(OJClass declarer, OJModifier modif, OJClass[] parameterTypes, OJClass[] exceptionTypes, openjava.ptree.ConstructorInvocation ci, openjava.ptree.StatementList body)
           
  OJConstructor(OJClass declarer, OJModifier modif, OJClass[] parameterTypes, java.lang.String[] parameterNames, OJClass[] exceptionTypes, openjava.ptree.ConstructorInvocation ci, openjava.ptree.StatementList body)
           
  OJConstructor(OJClass declarer, OJModifier modif, openjava.ptree.ParameterList params, OJClass[] exceptionTypes, openjava.ptree.ConstructorInvocation ci, openjava.ptree.StatementList body)
           
 
Method Summary
 void addExceptionType(OJClass type)
           
static OJConstructor[] arrayForConstructors(java.lang.reflect.Constructor[] jconstrs)
           
private  boolean compareParameters(OJClass[] params2)
           
private  boolean compareParameters(OJConstructor other)
           
 boolean equals(java.lang.Object obj)
          Compares this method against the given object.
static OJConstructor forConstructor(java.lang.reflect.Constructor java_constr)
           
 openjava.ptree.StatementList getBody()
           
 java.lang.reflect.Constructor getByteCode()
           
 OJClass getDeclaringClass()
           
 Environment getEnvironment()
           
 OJClass[] getExceptionTypes()
           
 java.lang.String getIdentifiableName()
           
 OJModifier getModifiers()
           
 java.lang.String getName()
           
 java.lang.String[] getParameters()
           
 OJClass[] getParameterTypes()
           
 openjava.ptree.ExpressionList getParameterVariables()
           
 openjava.ptree.ConstructorDeclaration getSourceCode()
           
 openjava.ptree.ParseTree getSuffix(java.lang.String keyword)
           
 openjava.ptree.ConstructorInvocation getTransference()
           
 int hashCode()
          Computes a hashcode for this method.
 boolean isAlterable()
           
 boolean isExecutable()
           
 java.lang.Object newInstance(java.lang.Object[] initargs)
          Creates a new instance of the constructor's declaring class
 openjava.ptree.StatementList setBody(openjava.ptree.StatementList stmts)
           
(package private)  void setDeclaringClass(OJClass parent)
           
 void setExceptionTypes(OJClass[] types)
           
 void setModifiers(int mods)
           
 openjava.ptree.ConstructorInvocation setTransference(openjava.ptree.ConstructorInvocation invocation)
           
 Signature signature()
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

substance

private OJConstructorImp substance

table

private static java.util.Hashtable table
Constructor Detail

OJConstructor

OJConstructor(java.lang.reflect.Constructor m)

OJConstructor

public OJConstructor(OJClass declarer,
                     OJModifier modif,
                     OJClass[] parameterTypes,
                     OJClass[] exceptionTypes,
                     openjava.ptree.ConstructorInvocation ci,
                     openjava.ptree.StatementList body)

OJConstructor

public OJConstructor(OJClass declarer,
                     OJModifier modif,
                     OJClass[] parameterTypes,
                     java.lang.String[] parameterNames,
                     OJClass[] exceptionTypes,
                     openjava.ptree.ConstructorInvocation ci,
                     openjava.ptree.StatementList body)

OJConstructor

public OJConstructor(OJClass declarer,
                     OJModifier modif,
                     openjava.ptree.ParameterList params,
                     OJClass[] exceptionTypes,
                     openjava.ptree.ConstructorInvocation ci,
                     openjava.ptree.StatementList body)

OJConstructor

public OJConstructor(Environment env,
                     OJClass declarer,
                     openjava.ptree.ConstructorDeclaration d)
Method Detail

forConstructor

public static OJConstructor forConstructor(java.lang.reflect.Constructor java_constr)

arrayForConstructors

public static OJConstructor[] arrayForConstructors(java.lang.reflect.Constructor[] jconstrs)

signature

public Signature signature()
Specified by:
signature in interface OJMember

getDeclaringClass

public OJClass getDeclaringClass()
Specified by:
getDeclaringClass in interface OJMember

getName

public java.lang.String getName()
Specified by:
getName in interface OJMember

getIdentifiableName

public java.lang.String getIdentifiableName()

getModifiers

public OJModifier getModifiers()
Specified by:
getModifiers in interface OJMember

getParameterTypes

public OJClass[] getParameterTypes()

getExceptionTypes

public OJClass[] getExceptionTypes()

getSuffix

public openjava.ptree.ParseTree getSuffix(java.lang.String keyword)

getParameterVariables

public openjava.ptree.ExpressionList getParameterVariables()
                                                    throws CannotAlterException

getParameters

public java.lang.String[] getParameters()
                                 throws CannotAlterException

equals

public boolean equals(java.lang.Object obj)
Compares this method against the given object. The algorithm is borrowed by java.lang.reflect.Constructor.equals().


compareParameters

private boolean compareParameters(OJConstructor other)

compareParameters

private boolean compareParameters(OJClass[] params2)

hashCode

public int hashCode()
Computes a hashcode for this method. The algorithm is borrowed by java.lang.reflect.Constructor.hashCode().


toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


getEnvironment

public Environment getEnvironment()
Specified by:
getEnvironment in interface OJMember

newInstance

public java.lang.Object newInstance(java.lang.Object[] initargs)
                             throws java.lang.InstantiationException,
                                    java.lang.IllegalAccessException,
                                    java.lang.IllegalArgumentException,
                                    java.lang.reflect.InvocationTargetException,
                                    java.lang.InstantiationException,
                                    CannotExecuteException
Creates a new instance of the constructor's declaring class


isExecutable

public final boolean isExecutable()

isAlterable

public final boolean isAlterable()

getByteCode

public final java.lang.reflect.Constructor getByteCode()
                                                throws CannotExecuteException

getSourceCode

public final openjava.ptree.ConstructorDeclaration getSourceCode()
                                                          throws CannotAlterException

getBody

public final openjava.ptree.StatementList getBody()
                                           throws CannotAlterException

getTransference

public final openjava.ptree.ConstructorInvocation getTransference()
                                                           throws CannotAlterException

setDeclaringClass

void setDeclaringClass(OJClass parent)
                 throws CannotAlterException

setModifiers

public final void setModifiers(int mods)
                        throws CannotAlterException

setExceptionTypes

public final void setExceptionTypes(OJClass[] types)
                             throws CannotAlterException

addExceptionType

public final void addExceptionType(OJClass type)
                            throws CannotAlterException

setTransference

public final openjava.ptree.ConstructorInvocation setTransference(openjava.ptree.ConstructorInvocation invocation)
                                                           throws CannotAlterException

setBody

public final openjava.ptree.StatementList setBody(openjava.ptree.StatementList stmts)
                                           throws CannotAlterException