org.datanucleus.enhancer.jdo
Class JDOClassMethod

java.lang.Object
  extended by org.datanucleus.enhancer.ClassMethod
      extended by org.datanucleus.enhancer.jdo.JDOClassMethod
Direct Known Subclasses:
DefaultConstructor, InitClass, InitFieldFlags, InitFieldNames, InitFieldTypes, InitPersistenceCapableSuperclass, JdoCopyField, JdoCopyFields, JdoCopyKeyFieldsFromObjectId, JdoCopyKeyFieldsFromObjectId2, JdoCopyKeyFieldsToObjectId, JdoCopyKeyFieldsToObjectId2, JdoGetInheritedFieldCount, JdoGetManagedFieldCount, JdoGetNormal, JdoGetObjectId, JdoGetPersistenceManager, JdoGetTransactionalObjectId, JdoGetVersion, JdoGetViaCheck, JdoGetViaMediate, JdoIsDetached, JdoIsDirty, JdoIsXXX, JdoMakeDirty, JdoNewInstance1, JdoNewInstance2, JdoNewObjectIdInstance1, JdoNewObjectIdInstance2, JdoPreSerialize, JdoProvideField, JdoProvideFields, JdoReplaceDetachedState, JdoReplaceField, JdoReplaceFields, JdoReplaceFlags, JdoReplaceStateManager, JdoSetNormal, JdoSetViaCheck, JdoSetViaMediate, JdoSuperClone, LoadClass, WriteObject

public abstract class JDOClassMethod
extends ClassMethod

Representation of a method required by an enhanced class, for use by ASM.


Field Summary
protected  MethodVisitor visitor
          Visitor for use in updating the method of the class (set in initialise).
 
Fields inherited from class org.datanucleus.enhancer.ClassMethod
access, argNames, argTypes, enhancer, exceptions, LOCALISER, methodName, returnType
 
Constructor Summary
JDOClassMethod(ClassEnhancer enhancer, java.lang.String name, int access, java.lang.Object returnType, java.lang.Object[] argTypes, java.lang.String[] argNames)
          Constructor.
JDOClassMethod(ClassEnhancer enhancer, java.lang.String name, int access, java.lang.Object returnType, java.lang.Object[] argTypes, java.lang.String[] argNames, java.lang.String[] exceptions)
          Constructor.
 
Method Summary
protected  JDOClassEnhancer getClassEnhancer()
          Convenience accessor for the ASMClassEnhancer
 java.lang.String getDescriptor()
          Accessor for the descriptor of the method.
 void initialise()
          Default implementation of initialise, specifying the method based on the ClassMethod info.
 void initialise(ClassVisitor classVisitor)
          Method to initialise the class method.
 
Methods inherited from class org.datanucleus.enhancer.ClassMethod
close, equals, execute, getAccess, getMethodAdditionMessage, getName, getNamer, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

visitor

protected MethodVisitor visitor
Visitor for use in updating the method of the class (set in initialise).

Constructor Detail

JDOClassMethod

public JDOClassMethod(ClassEnhancer enhancer,
                      java.lang.String name,
                      int access,
                      java.lang.Object returnType,
                      java.lang.Object[] argTypes,
                      java.lang.String[] argNames)
Constructor.

Parameters:
enhancer - Class Enhancer
name - method name
access - Access type for the method
returnType - return type
argTypes - argment types
argNames - argment names

JDOClassMethod

public JDOClassMethod(ClassEnhancer enhancer,
                      java.lang.String name,
                      int access,
                      java.lang.Object returnType,
                      java.lang.Object[] argTypes,
                      java.lang.String[] argNames,
                      java.lang.String[] exceptions)
Constructor.

Parameters:
enhancer - Class Enhancer
name - method name
access - Access type for the method
returnType - return type
argTypes - argment types
argNames - argment names
exceptions - Exceptions that can be thrown
Method Detail

getClassEnhancer

protected JDOClassEnhancer getClassEnhancer()
Convenience accessor for the ASMClassEnhancer

Returns:
ClassEnhancer for ASM

initialise

public void initialise()
Default implementation of initialise, specifying the method based on the ClassMethod info.

Specified by:
initialise in class ClassMethod

initialise

public void initialise(ClassVisitor classVisitor)
Method to initialise the class method.

Parameters:
classVisitor - Visitor for the class

getDescriptor

public java.lang.String getDescriptor()
Accessor for the descriptor of the method.

Returns:
The descriptor


Copyright © 2013. All Rights Reserved.