org.datanucleus.enhancer.asm
Class ASMClassMethod

java.lang.Object
  extended by org.datanucleus.enhancer.ClassMethod
      extended by org.datanucleus.enhancer.asm.ASMClassMethod
Direct Known Subclasses:
CheckRead, CheckWrite, DefaultConstructor, InitClass, InitFieldFlags, InitFieldNames, InitFieldTypes, InitPersistenceCapableSuperclass, JdoCopyField, JdoCopyFields, JdoCopyKeyFieldsFromObjectId, JdoCopyKeyFieldsFromObjectId2, JdoCopyKeyFieldsToObjectId, JdoCopyKeyFieldsToObjectId2, JdoGetInheritedFieldCount, JdoGetManagedFieldCount, JdoGetObjectId, JdoGetPersistenceManager, JdoGetTransactionalObjectId, JdoGetVersion, JdoIsDetached, JdoIsDirty, JdoIsXXX, JdoMakeDirty, JdoNewInstance1, JdoNewInstance2, JdoNewObjectIdInstance1, JdoNewObjectIdInstance2, JdoPreSerialize, JdoProvideField, JdoProvideFields, JdoReplaceDetachedState, JdoReplaceField, JdoReplaceFields, JdoReplaceFlags, JdoReplaceStateManager, JdoSuperClone, LoadClass, MediateRead, MediateWrite, NormalGet, NormalSet, WriteObject

public abstract class ASMClassMethod
extends ClassMethod

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

Version:
$Revision: 1.6 $

Field Summary
protected  org.objectweb.asm.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
ASMClassMethod(ClassEnhancer enhancer, java.lang.String name, int access, java.lang.Object returnType, java.lang.Object[] argTypes, java.lang.String[] argNames)
          Constructor.
ASMClassMethod(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  ASMClassEnhancer 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(org.objectweb.asm.ClassVisitor classVisitor)
          Method to initialise the class method.
 
Methods inherited from class org.datanucleus.enhancer.ClassMethod
close, equals, execute, getAccess, getMethodAdditionMessage, getName, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

visitor

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

Constructor Detail

ASMClassMethod

public ASMClassMethod(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

ASMClassMethod

public ASMClassMethod(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 ASMClassEnhancer 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(org.objectweb.asm.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 © 2009. All Rights Reserved.