openjava.mop
Class OJMethodSourceCode
java.lang.Object
|
+--openjava.mop.OJMethodImp
|
+--openjava.mop.OJMethodSourceCode
- class OJMethodSourceCode
- extends OJMethodImp
idCounter
private static int idCounter
id
private int id
declarer
private OJClass declarer
definition
private MethodDeclaration definition
env
private Environment env
ptypeCache
private OJClass[] ptypeCache
paramtypes
private TypeName[] paramtypes
OJMethodSourceCode
OJMethodSourceCode(Environment env,
OJClass declarer,
MethodDeclaration ptree)
toString
public String toString()
- Specified by:
toString
in class OJMethodImp
getDeclaringClass
OJClass getDeclaringClass()
- Specified by:
getDeclaringClass
in class OJMethodImp
getName
String getName()
- Specified by:
getName
in class OJMethodImp
getIdentifiableName
String getIdentifiableName()
- Specified by:
getIdentifiableName
in class OJMethodImp
getModifiers
OJModifier getModifiers()
- Specified by:
getModifiers
in class OJMethodImp
getReturnType
OJClass getReturnType()
- Specified by:
getReturnType
in class OJMethodImp
isPtypeCacheDirty
private boolean isPtypeCacheDirty(TypeName[] paramtypes)
refleshPtypeCache
private void refleshPtypeCache()
getParameterTypes
OJClass[] getParameterTypes()
- Specified by:
getParameterTypes
in class OJMethodImp
getParameters
String[] getParameters()
getExceptionTypes
OJClass[] getExceptionTypes()
- Specified by:
getExceptionTypes
in class OJMethodImp
getSuffix
ParseTree getSuffix(String keyword)
- Specified by:
getSuffix
in class OJMethodImp
arrayForParameters
private final OJClass[] arrayForParameters(ParameterList params)
arrayForTypeNames
private final OJClass[] arrayForTypeNames(TypeName[] typenames)
getEnvironment
Environment getEnvironment()
- Specified by:
getEnvironment
in class OJMethodImp
invoke
Object invoke(Object obj,
Object[] args)
throws IllegalAccessException,
IllegalArgumentException,
InvocationTargetException,
CannotExecuteException
- Invokes this method on the given object with the given parameters.
- Specified by:
invoke
in class OJMethodImp
- Throws:
CannotExecuteException
- if this method is not compiled yet.
IllegalAccessException
IllegalArgumentException
InvocationTargetException
isAlterable
boolean isAlterable()
- Specified by:
isAlterable
in class OJMethodImp
isExecutable
boolean isExecutable()
- Specified by:
isExecutable
in class OJMethodImp
getByteCode
Method getByteCode()
throws CannotExecuteException
- Specified by:
getByteCode
in class OJMethodImp
CannotExecuteException
getSourceCode
MethodDeclaration getSourceCode()
throws CannotAlterException
- Specified by:
getSourceCode
in class OJMethodImp
CannotAlterException
getBody
StatementList getBody()
throws CannotAlterException
- Specified by:
getBody
in class OJMethodImp
CannotAlterException
setDeclaringClass
void setDeclaringClass(OJClass parent)
throws CannotAlterException
- Specified by:
setDeclaringClass
in class OJMethodImp
CannotAlterException
setName
final void setName(String name)
throws CannotAlterException
- Specified by:
setName
in class OJMethodImp
CannotAlterException
setModifiers
final void setModifiers(int mods)
throws CannotAlterException
- Specified by:
setModifiers
in class OJMethodImp
CannotAlterException
setReturnType
final void setReturnType(OJClass type)
throws CannotAlterException
- Specified by:
setReturnType
in class OJMethodImp
CannotAlterException
setExceptionTypes
final void setExceptionTypes(OJClass[] types)
throws CannotAlterException
- Specified by:
setExceptionTypes
in class OJMethodImp
CannotAlterException
setBody
StatementList setBody(StatementList stmts)
throws CannotAlterException
- Specified by:
setBody
in class OJMethodImp
CannotAlterException