java.lang.Object
openjava.mop.OJConstructor
- All Implemented Interfaces:
- OJMember
- public final class OJConstructor
- extends java.lang.Object
- implements OJMember
|
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)
|
substance
private OJConstructorImp substance
table
private static java.util.Hashtable table
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)
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