openjava.mop
Class OJMethodSourceCode

java.lang.Object
  |
  +--openjava.mop.OJMethodImp
        |
        +--openjava.mop.OJMethodSourceCode

class OJMethodSourceCode
extends OJMethodImp


Field Summary
private  OJClass declarer
           
private  MethodDeclaration definition
           
private  Environment env
           
private  int id
           
private static int idCounter
           
private  TypeName[] paramtypes
           
private  OJClass[] ptypeCache
           
 
Constructor Summary
(package private) OJMethodSourceCode(Environment env, OJClass declarer, MethodDeclaration ptree)
           
 
Method Summary
private  OJClass[] arrayForParameters(ParameterList params)
           
private  OJClass[] arrayForTypeNames(TypeName[] typenames)
           
(package private)  StatementList getBody()
           
(package private)  Method getByteCode()
           
(package private)  OJClass getDeclaringClass()
           
(package private)  Environment getEnvironment()
           
(package private)  OJClass[] getExceptionTypes()
           
(package private)  String getIdentifiableName()
           
(package private)  OJModifier getModifiers()
           
(package private)  String getName()
           
(package private)  String[] getParameters()
           
(package private)  OJClass[] getParameterTypes()
           
(package private)  OJClass getReturnType()
           
(package private)  MethodDeclaration getSourceCode()
           
(package private)  ParseTree getSuffix(String keyword)
           
(package private)  Object invoke(Object obj, Object[] args)
          Invokes this method on the given object with the given parameters.
(package private)  boolean isAlterable()
           
(package private)  boolean isExecutable()
           
private  boolean isPtypeCacheDirty(TypeName[] paramtypes)
           
private  void refleshPtypeCache()
           
(package private)  StatementList setBody(StatementList stmts)
           
(package private)  void setDeclaringClass(OJClass parent)
           
(package private)  void setExceptionTypes(OJClass[] types)
           
(package private)  void setModifiers(int mods)
           
(package private)  void setName(String name)
           
(package private)  void setReturnType(OJClass type)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

OJMethodSourceCode

OJMethodSourceCode(Environment env,
                   OJClass declarer,
                   MethodDeclaration ptree)
Method Detail

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

SourceForge.net_Logo