openjava.mop
Class OJConstructorSourceCode

java.lang.Object
openjava.mop.OJConstructorImp
openjava.mop.OJConstructorSourceCode
- class OJConstructorSourceCode
- extends OJConstructorImp
idCounter
private static int idCounter
id
private int id
declarer
private OJClass declarer
definition
private openjava.ptree.ConstructorDeclaration definition
env
private Environment env
OJConstructorSourceCode
OJConstructorSourceCode(Environment env,
OJClass declarer,
openjava.ptree.ConstructorDeclaration ptree)
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()).
- Specified by:
toString in class OJConstructorImp
getEnvironment
Environment getEnvironment()
- Specified by:
getEnvironment in class OJConstructorImp
getDeclaringClass
OJClass getDeclaringClass()
- Specified by:
getDeclaringClass in class OJConstructorImp
getName
java.lang.String getName()
- Specified by:
getName in class OJConstructorImp
getIdentifiableName
java.lang.String getIdentifiableName()
- Specified by:
getIdentifiableName in class OJConstructorImp
getModifiers
OJModifier getModifiers()
- Specified by:
getModifiers in class OJConstructorImp
getParameterTypes
OJClass[] getParameterTypes()
- Specified by:
getParameterTypes in class OJConstructorImp
getParameters
java.lang.String[] getParameters()
getExceptionTypes
OJClass[] getExceptionTypes()
- Specified by:
getExceptionTypes in class OJConstructorImp
getSuffix
openjava.ptree.ParseTree getSuffix(java.lang.String keyword)
- Specified by:
getSuffix in class OJConstructorImp
arrayForParameters
private final OJClass[] arrayForParameters(openjava.ptree.ParameterList params)
arrayForTypeNames
private final OJClass[] arrayForTypeNames(openjava.ptree.TypeName[] typenames)
newInstance
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
- Specified by:
newInstance in class OJConstructorImp
isExecutable
boolean isExecutable()
- Specified by:
isExecutable in class OJConstructorImp
isAlterable
boolean isAlterable()
- Specified by:
isAlterable in class OJConstructorImp
getByteCode
java.lang.reflect.Constructor getByteCode()
throws CannotExecuteException
- Specified by:
getByteCode in class OJConstructorImp
getSourceCode
openjava.ptree.ConstructorDeclaration getSourceCode()
throws CannotAlterException
- Specified by:
getSourceCode in class OJConstructorImp
getBody
openjava.ptree.StatementList getBody()
throws CannotAlterException
- Specified by:
getBody in class OJConstructorImp
getTransference
openjava.ptree.ConstructorInvocation getTransference()
throws CannotAlterException
- Specified by:
getTransference in class OJConstructorImp
setDeclaringClass
void setDeclaringClass(OJClass parent)
throws CannotAlterException
- Specified by:
setDeclaringClass in class OJConstructorImp
setModifiers
final void setModifiers(int mods)
throws CannotAlterException
- Specified by:
setModifiers in class OJConstructorImp
setExceptionTypes
final void setExceptionTypes(OJClass[] types)
throws CannotAlterException
- Specified by:
setExceptionTypes in class OJConstructorImp
setBody
openjava.ptree.StatementList setBody(openjava.ptree.StatementList stmts)
throws CannotAlterException
- Specified by:
setBody in class OJConstructorImp
setTransference
openjava.ptree.ConstructorInvocation setTransference(openjava.ptree.ConstructorInvocation invocation)
throws CannotAlterException
- Specified by:
setTransference in class OJConstructorImp