org.datanucleus.enhancer.asm
Class ASMImplementationGenerator

java.lang.Object
  extended by org.datanucleus.enhancer.AbstractImplementationGenerator
      extended by org.datanucleus.enhancer.asm.ASMImplementationGenerator

public class ASMImplementationGenerator
extends AbstractImplementationGenerator

Implementation generator using ASM bytecode manipulation library.


Field Summary
 
Fields inherited from class org.datanucleus.enhancer.AbstractImplementationGenerator
bytes, className, fullClassName, fullSuperclassName, inputCmd, metaDataMgr
 
Constructor Summary
ASMImplementationGenerator(org.datanucleus.metadata.ClassMetaData cmd, java.lang.String implClassName, org.datanucleus.metadata.MetaDataManager mmgr)
          Constructor for an implementation of an abstract class.
ASMImplementationGenerator(org.datanucleus.metadata.InterfaceMetaData interfaceMetaData, java.lang.String implClassName, org.datanucleus.metadata.MetaDataManager mmgr)
          Constructor for an implementation of a persistent interface.
 
Method Summary
protected  void createDefaultConstructor()
          Create a default constructor, assuming that there is no persistent superclass.
protected  void createGetter(org.datanucleus.metadata.AbstractMemberMetaData mmd)
          Create a getter method for a /property.
protected  void createPropertyFields(org.datanucleus.metadata.AbstractClassMetaData acmd)
          Create the fields for the implementation.
protected  void createSetter(org.datanucleus.metadata.AbstractMemberMetaData mmd)
          Create a setter method for a property.
 void enhance(org.datanucleus.ClassLoaderResolver clr)
          Enhance the implementation of the class/interface.
 
Methods inherited from class org.datanucleus.enhancer.AbstractImplementationGenerator
createPropertyFields, createPropertyMethods, createPropertyMethods, dumpToFile, getBytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASMImplementationGenerator

public ASMImplementationGenerator(org.datanucleus.metadata.InterfaceMetaData interfaceMetaData,
                                  java.lang.String implClassName,
                                  org.datanucleus.metadata.MetaDataManager mmgr)
Constructor for an implementation of a persistent interface.

Parameters:
interfaceMetaData - MetaData for the persistent interface
implClassName - Name of the implementation class to generate (omitting packages)
mmgr - MetaData manager

ASMImplementationGenerator

public ASMImplementationGenerator(org.datanucleus.metadata.ClassMetaData cmd,
                                  java.lang.String implClassName,
                                  org.datanucleus.metadata.MetaDataManager mmgr)
Constructor for an implementation of an abstract class.

Parameters:
cmd - MetaData for the abstract class
implClassName - Name of the implementation class to generate (omitting packages)
mmgr - MetaData manager
Method Detail

enhance

public void enhance(org.datanucleus.ClassLoaderResolver clr)
Enhance the implementation of the class/interface.

Specified by:
enhance in class AbstractImplementationGenerator
Parameters:
clr - ClassLoader resolver

createPropertyFields

protected void createPropertyFields(org.datanucleus.metadata.AbstractClassMetaData acmd)
Create the fields for the implementation.

Specified by:
createPropertyFields in class AbstractImplementationGenerator
Parameters:
acmd - MetaData for the class/interface

createDefaultConstructor

protected void createDefaultConstructor()
Create a default constructor, assuming that there is no persistent superclass.


createGetter

protected void createGetter(org.datanucleus.metadata.AbstractMemberMetaData mmd)
Create a getter method for a /property.

Specified by:
createGetter in class AbstractImplementationGenerator
Parameters:
mmd - MetaData for the property

createSetter

protected void createSetter(org.datanucleus.metadata.AbstractMemberMetaData mmd)
Create a setter method for a property.

Specified by:
createSetter in class AbstractImplementationGenerator
Parameters:
mmd - MetaData for the property


Copyright © 2011. All Rights Reserved.