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

Quick Search    Search Deep

openjava.mop
Class OJMethodSourceCode  view OJMethodSourceCode download OJMethodSourceCode.java

java.lang.Object
  extended byopenjava.mop.OJMethodImp
      extended byopenjava.mop.OJMethodSourceCode

class OJMethodSourceCode
extends OJMethodImp


Field Summary
private  OJClass declarer
           
private  openjava.ptree.MethodDeclaration definition
           
private  Environment env
           
private  int id
           
private static int idCounter
           
private  openjava.ptree.TypeName[] paramtypes
           
private  OJClass[] ptypeCache
           
 
Constructor Summary
(package private) OJMethodSourceCode(Environment env, OJClass declarer, openjava.ptree.MethodDeclaration ptree)
           
 
Method Summary
private  OJClass[] arrayForParameters(openjava.ptree.ParameterList params)
           
private  OJClass[] arrayForTypeNames(openjava.ptree.TypeName[] typenames)
           
(package private)  openjava.ptree.StatementList getBody()
           
(package private)  java.lang.reflect.Method getByteCode()
           
(package private)  OJClass getDeclaringClass()
           
(package private)  Environment getEnvironment()
           
(package private)  OJClass[] getExceptionTypes()
           
(package private)  java.lang.String getIdentifiableName()
           
(package private)  OJModifier getModifiers()
           
(package private)  java.lang.String getName()
           
(package private)  java.lang.String[] getParameters()
           
(package private)  OJClass[] getParameterTypes()
           
(package private)  OJClass getReturnType()
           
(package private)  openjava.ptree.MethodDeclaration getSourceCode()
           
(package private)  openjava.ptree.ParseTree getSuffix(java.lang.String keyword)
           
(package private)  java.lang.Object invoke(java.lang.Object obj, java.lang.Object[] args)
          Invokes this method on the given object with the given parameters.
(package private)  boolean isAlterable()
           
(package private)  boolean isExecutable()
           
private  boolean isPtypeCacheDirty(openjava.ptree.TypeName[] paramtypes)
           
private  void refleshPtypeCache()
           
(package private)  openjava.ptree.StatementList setBody(openjava.ptree.StatementList stmts)
           
(package private)  void setDeclaringClass(OJClass parent)
           
(package private)  void setExceptionTypes(OJClass[] types)
           
(package private)  void setModifiers(int mods)
           
(package private)  void setName(java.lang.String name)
           
(package private)  void setReturnType(OJClass type)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
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 openjava.ptree.MethodDeclaration definition

env

private Environment env

ptypeCache

private OJClass[] ptypeCache

paramtypes

private openjava.ptree.TypeName[] paramtypes
Constructor Detail

OJMethodSourceCode

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

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 OJMethodImp

getDeclaringClass

OJClass getDeclaringClass()
Specified by:
getDeclaringClass in class OJMethodImp

getName

java.lang.String getName()
Specified by:
getName in class OJMethodImp

getIdentifiableName

java.lang.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(openjava.ptree.TypeName[] paramtypes)

refleshPtypeCache

private void refleshPtypeCache()

getParameterTypes

OJClass[] getParameterTypes()
Specified by:
getParameterTypes in class OJMethodImp

getParameters

java.lang.String[] getParameters()

getExceptionTypes

OJClass[] getExceptionTypes()
Specified by:
getExceptionTypes in class OJMethodImp

getSuffix

openjava.ptree.ParseTree getSuffix(java.lang.String keyword)
Specified by:
getSuffix in class OJMethodImp

arrayForParameters

private final OJClass[] arrayForParameters(openjava.ptree.ParameterList params)

arrayForTypeNames

private final OJClass[] arrayForTypeNames(openjava.ptree.TypeName[] typenames)

getEnvironment

Environment getEnvironment()
Specified by:
getEnvironment in class OJMethodImp

invoke

java.lang.Object invoke(java.lang.Object obj,
                        java.lang.Object[] args)
                  throws java.lang.IllegalAccessException,
                         java.lang.IllegalArgumentException,
                         java.lang.reflect.InvocationTargetException,
                         CannotExecuteException
Invokes this method on the given object with the given parameters.

Specified by:
invoke in class OJMethodImp

isAlterable

boolean isAlterable()
Specified by:
isAlterable in class OJMethodImp

isExecutable

boolean isExecutable()
Specified by:
isExecutable in class OJMethodImp

getByteCode

java.lang.reflect.Method getByteCode()
                               throws CannotExecuteException
Specified by:
getByteCode in class OJMethodImp

getSourceCode

openjava.ptree.MethodDeclaration getSourceCode()
                                         throws CannotAlterException
Specified by:
getSourceCode in class OJMethodImp

getBody

openjava.ptree.StatementList getBody()
                               throws CannotAlterException
Specified by:
getBody in class OJMethodImp

setDeclaringClass

void setDeclaringClass(OJClass parent)
                 throws CannotAlterException
Specified by:
setDeclaringClass in class OJMethodImp

setName

final void setName(java.lang.String name)
            throws CannotAlterException
Specified by:
setName in class OJMethodImp

setModifiers

final void setModifiers(int mods)
                 throws CannotAlterException
Specified by:
setModifiers in class OJMethodImp

setReturnType

final void setReturnType(OJClass type)
                  throws CannotAlterException
Specified by:
setReturnType in class OJMethodImp

setExceptionTypes

final void setExceptionTypes(OJClass[] types)
                      throws CannotAlterException
Specified by:
setExceptionTypes in class OJMethodImp

setBody

openjava.ptree.StatementList setBody(openjava.ptree.StatementList stmts)
                               throws CannotAlterException
Specified by:
setBody in class OJMethodImp