org.datanucleus.enhancer
Interface ClassEnhancer

All Known Implementing Classes:
AbstractClassEnhancer, ASMClassEnhancer, BCELClassEnhancer

public interface ClassEnhancer

Interface representation of an enhancer of a class.


Field Summary
static java.lang.String CN_BitSet
          Class name of java.util.BitSet
static java.lang.String CN_ByteIdentity
           
static java.lang.String CN_CharIdentity
           
static java.lang.String CN_Class
          Class name of java.lang.Class
static java.lang.String CN_ClassCastException
          Class name of java.lang.ClassCastException
static java.lang.String CN_Detachable
          Class name of java.jdo.spi.Detachable
static java.lang.String CN_IllegalArgumentException
          Class name of java.lang.IllegalArgumentException
static java.lang.String CN_IllegalStateException
          Class name of java.lang.IllegalStateException
static java.lang.String CN_IntIdentity
           
static java.lang.String CN_JDODetachedFieldAccessException
          Class name of javax.jdo.JDODetachedFieldAccessException
static java.lang.String CN_JDOFatalInternalException
          Class name of javax.jdo.JDOFatalInternalException
static java.lang.String CN_JDOHelper
          Class name of javax.jdo.JDOHelper
static java.lang.String CN_JDOImplHelper
          Class name of javax.jdo.spi.JDOImplHelper
static java.lang.String CN_LongIdentity
           
static java.lang.String CN_ObjectIdentity
           
static java.lang.String CN_ObjectIdFieldConsumer
          Class name of javax.jdo.spi.PersistenceCapable.ObjectIdFieldConsumer
static java.lang.String CN_ObjectIdFieldSupplier
          Class name of javax.jdo.spi.PersistenceCapable.ObjectIdFieldSupplier
static java.lang.String CN_PersistenceCapable
          Class name of java.jdo.spi.PersistenceCapable
static java.lang.String CN_PersistenceManager
          Class name of javax.jdo.PersistenceManager
static java.lang.String CN_ShortIdentity
           
static java.lang.String CN_StateManager
          Class name of javax.jdo.spi.StateManager
static java.lang.String CN_StringIdentity
          Class name of SingleFieldIdentity classes
static java.lang.String FN_FieldFlags
          Field name of jdoFieldFlags
static java.lang.String FN_FieldNames
          Field name of jdoFieldNames
static java.lang.String FN_FieldTypes
          Field name of jdoFieldTypes
static java.lang.String FN_Flag
          Field name of jdoFlags
static java.lang.String FN_JdoDetachedState
          Field name of jdoDetachedState
static java.lang.String FN_JdoInheritedFieldCount
          Field name of jdoFieldCount
static java.lang.String FN_PersistenceCapableSuperclass
          Field name of jdoPersistenceCapableSuperclass
static java.lang.String FN_serialVersionUID
          Field name of serialVersionUID
static java.lang.String FN_StateManager
          Field name of jdoStateManager
static java.lang.String MN_FieldFlagsInitMethod
          Method name for initialising jdoFieldFlags
static java.lang.String MN_FieldNamesInitMethod
          Method name for initialising jdoFieldNames
static java.lang.String MN_FieldTypesInitMethod
          Method name for initialising jdoFieldTypes
static java.lang.String MN_JdoCopyField
          Method name of jdoCopyField
static java.lang.String MN_JdoCopyFields
          Method name of jdoCopyFields
static java.lang.String MN_JdoCopyKeyFieldsFromObjectId
          Method name of jdoCopyFieldsFromObjectId
static java.lang.String MN_JdoCopyKeyFieldsToObjectId
          Method name of jdoCopyFieldsToObjectId
static java.lang.String MN_JdoGetInheritedFieldCount
          Method name for __jdoGetInheritedFieldCount
static java.lang.String MN_JdoGetManagedFieldCount
          Method name for jdoGetManagedFieldCount
static java.lang.String MN_JdoGetObjectId
          Method name for object id accessor
static java.lang.String MN_JdoGetPersistenceManager
          Method name of jdoGetPersistenceManager
static java.lang.String MN_JdoGetTransactionalObjectId
          Method name for transactional object id accessor
static java.lang.String MN_JdoGetVersion
          Method name for version accessor
static java.lang.String MN_JdoIsDeleted
          Method name of jdoIsDeleted
static java.lang.String MN_JdoIsDetached
          Method name of jdoIsDetached
static java.lang.String MN_JdoIsDetachedInternal
          Method name of jdoIsDetachedInternal
static java.lang.String MN_JdoIsDirty
          Method name of jdoIsDirty
static java.lang.String MN_JdoIsNew
          Method name of jdoIsNew
static java.lang.String MN_JdoIsPersistent
          Method name of jdoIsPersistent
static java.lang.String MN_JdoIsTransactional
          Method name of jdoIsTransactional
static java.lang.String MN_jdoLoadClass
          Method name of jdoLoadClass
static java.lang.String MN_JdoMakeDirty
          Method name of jdoMakeDirty.
static java.lang.String MN_JdoMakeDirtyDetached
          Method name of jdoMakeDirtyDetached.
static java.lang.String MN_JdoNewInstance
          Method name of jdoNewInstance.
static java.lang.String MN_JdoNewObjectIdInstance
          Method name of jdoNewObjectIdInstance.
static java.lang.String MN_JdoPersistenceCapableSuperclassInit
          Method name for __jdoPersistenceCapableSuperclassInit
static java.lang.String MN_JdoPreSerialize
          Method name of jdoPreSerialize
static java.lang.String MN_JdoProvideField
          Method name of jdoProvideField
static java.lang.String MN_JdoProvideFields
          Method name of jdoProvideFields
static java.lang.String MN_JdoReplaceDetachedState
          Method name of jdoReplaceDetachedState.
static java.lang.String MN_JdoReplaceField
          Method name of jdoReplaceField
static java.lang.String MN_JdoReplaceFields
          Method name of jdoReplaceFields.
static java.lang.String MN_JdoReplaceFlags
          Method name of jdoReplaceFlags.
static java.lang.String MN_JdoReplaceStateManager
          Method name of jdoReplaceStateManager.
static java.lang.String MN_JdoSuperClone
          Method name for jdoSuperClone
 
Method Summary
 boolean enhance()
          Method to enhance the class definition internally.
 byte[] getBytes()
          Access the class bytecode.
 org.datanucleus.ClassLoaderResolver getClassLoaderResolver()
          Accessor for the ClassLoaderResolver in use.
 org.datanucleus.metadata.ClassMetaData getClassMetaData()
          Accessor for the ClassMetaData for the class.
 void save(java.lang.String directoryName)
          Method to save the (current) class definition bytecode into a class file.
 boolean validate()
          Validate whether the class is enhanced.
 

Field Detail

FN_StateManager

static final java.lang.String FN_StateManager
Field name of jdoStateManager

See Also:
Constant Field Values

FN_Flag

static final java.lang.String FN_Flag
Field name of jdoFlags

See Also:
Constant Field Values

FN_FieldNames

static final java.lang.String FN_FieldNames
Field name of jdoFieldNames

See Also:
Constant Field Values

FN_FieldTypes

static final java.lang.String FN_FieldTypes
Field name of jdoFieldTypes

See Also:
Constant Field Values

FN_FieldFlags

static final java.lang.String FN_FieldFlags
Field name of jdoFieldFlags

See Also:
Constant Field Values

FN_PersistenceCapableSuperclass

static final java.lang.String FN_PersistenceCapableSuperclass
Field name of jdoPersistenceCapableSuperclass

See Also:
Constant Field Values

FN_JdoInheritedFieldCount

static final java.lang.String FN_JdoInheritedFieldCount
Field name of jdoFieldCount

See Also:
Constant Field Values

FN_JdoDetachedState

static final java.lang.String FN_JdoDetachedState
Field name of jdoDetachedState

See Also:
Constant Field Values

FN_serialVersionUID

static final java.lang.String FN_serialVersionUID
Field name of serialVersionUID

See Also:
Constant Field Values

MN_FieldNamesInitMethod

static final java.lang.String MN_FieldNamesInitMethod
Method name for initialising jdoFieldNames

See Also:
Constant Field Values

MN_FieldTypesInitMethod

static final java.lang.String MN_FieldTypesInitMethod
Method name for initialising jdoFieldTypes

See Also:
Constant Field Values

MN_FieldFlagsInitMethod

static final java.lang.String MN_FieldFlagsInitMethod
Method name for initialising jdoFieldFlags

See Also:
Constant Field Values

MN_JdoGetObjectId

static final java.lang.String MN_JdoGetObjectId
Method name for object id accessor

See Also:
Constant Field Values

MN_JdoGetTransactionalObjectId

static final java.lang.String MN_JdoGetTransactionalObjectId
Method name for transactional object id accessor

See Also:
Constant Field Values

MN_JdoGetVersion

static final java.lang.String MN_JdoGetVersion
Method name for version accessor

See Also:
Constant Field Values

MN_JdoIsDetached

static final java.lang.String MN_JdoIsDetached
Method name of jdoIsDetached

See Also:
Constant Field Values

MN_JdoIsDetachedInternal

static final java.lang.String MN_JdoIsDetachedInternal
Method name of jdoIsDetachedInternal

See Also:
Constant Field Values

MN_JdoIsDeleted

static final java.lang.String MN_JdoIsDeleted
Method name of jdoIsDeleted

See Also:
Constant Field Values

MN_JdoIsDirty

static final java.lang.String MN_JdoIsDirty
Method name of jdoIsDirty

See Also:
Constant Field Values

MN_JdoIsNew

static final java.lang.String MN_JdoIsNew
Method name of jdoIsNew

See Also:
Constant Field Values

MN_JdoIsPersistent

static final java.lang.String MN_JdoIsPersistent
Method name of jdoIsPersistent

See Also:
Constant Field Values

MN_JdoIsTransactional

static final java.lang.String MN_JdoIsTransactional
Method name of jdoIsTransactional

See Also:
Constant Field Values

MN_JdoGetPersistenceManager

static final java.lang.String MN_JdoGetPersistenceManager
Method name of jdoGetPersistenceManager

See Also:
Constant Field Values

MN_JdoPreSerialize

static final java.lang.String MN_JdoPreSerialize
Method name of jdoPreSerialize

See Also:
Constant Field Values

MN_JdoGetInheritedFieldCount

static final java.lang.String MN_JdoGetInheritedFieldCount
Method name for __jdoGetInheritedFieldCount

See Also:
Constant Field Values

MN_JdoSuperClone

static final java.lang.String MN_JdoSuperClone
Method name for jdoSuperClone

See Also:
Constant Field Values

MN_JdoGetManagedFieldCount

static final java.lang.String MN_JdoGetManagedFieldCount
Method name for jdoGetManagedFieldCount

See Also:
Constant Field Values

MN_JdoPersistenceCapableSuperclassInit

static final java.lang.String MN_JdoPersistenceCapableSuperclassInit
Method name for __jdoPersistenceCapableSuperclassInit

See Also:
Constant Field Values

MN_jdoLoadClass

static final java.lang.String MN_jdoLoadClass
Method name of jdoLoadClass

See Also:
Constant Field Values

MN_JdoCopyField

static final java.lang.String MN_JdoCopyField
Method name of jdoCopyField

See Also:
Constant Field Values

MN_JdoCopyFields

static final java.lang.String MN_JdoCopyFields
Method name of jdoCopyFields

See Also:
Constant Field Values

MN_JdoCopyKeyFieldsFromObjectId

static final java.lang.String MN_JdoCopyKeyFieldsFromObjectId
Method name of jdoCopyFieldsFromObjectId

See Also:
Constant Field Values

MN_JdoCopyKeyFieldsToObjectId

static final java.lang.String MN_JdoCopyKeyFieldsToObjectId
Method name of jdoCopyFieldsToObjectId

See Also:
Constant Field Values

MN_JdoProvideField

static final java.lang.String MN_JdoProvideField
Method name of jdoProvideField

See Also:
Constant Field Values

MN_JdoProvideFields

static final java.lang.String MN_JdoProvideFields
Method name of jdoProvideFields

See Also:
Constant Field Values

MN_JdoReplaceField

static final java.lang.String MN_JdoReplaceField
Method name of jdoReplaceField

See Also:
Constant Field Values

MN_JdoReplaceFields

static final java.lang.String MN_JdoReplaceFields
Method name of jdoReplaceFields.

See Also:
Constant Field Values

MN_JdoReplaceFlags

static final java.lang.String MN_JdoReplaceFlags
Method name of jdoReplaceFlags.

See Also:
Constant Field Values

MN_JdoReplaceStateManager

static final java.lang.String MN_JdoReplaceStateManager
Method name of jdoReplaceStateManager.

See Also:
Constant Field Values

MN_JdoReplaceDetachedState

static final java.lang.String MN_JdoReplaceDetachedState
Method name of jdoReplaceDetachedState.

See Also:
Constant Field Values

MN_JdoMakeDirty

static final java.lang.String MN_JdoMakeDirty
Method name of jdoMakeDirty.

See Also:
Constant Field Values

MN_JdoMakeDirtyDetached

static final java.lang.String MN_JdoMakeDirtyDetached
Method name of jdoMakeDirtyDetached.

See Also:
Constant Field Values

MN_JdoNewInstance

static final java.lang.String MN_JdoNewInstance
Method name of jdoNewInstance.

See Also:
Constant Field Values

MN_JdoNewObjectIdInstance

static final java.lang.String MN_JdoNewObjectIdInstance
Method name of jdoNewObjectIdInstance.

See Also:
Constant Field Values

CN_StateManager

static final java.lang.String CN_StateManager
Class name of javax.jdo.spi.StateManager


CN_PersistenceCapable

static final java.lang.String CN_PersistenceCapable
Class name of java.jdo.spi.PersistenceCapable


CN_Detachable

static final java.lang.String CN_Detachable
Class name of java.jdo.spi.Detachable


CN_JDOHelper

static final java.lang.String CN_JDOHelper
Class name of javax.jdo.JDOHelper


CN_JDOImplHelper

static final java.lang.String CN_JDOImplHelper
Class name of javax.jdo.spi.JDOImplHelper


CN_JDOFatalInternalException

static final java.lang.String CN_JDOFatalInternalException
Class name of javax.jdo.JDOFatalInternalException


CN_BitSet

static final java.lang.String CN_BitSet
Class name of java.util.BitSet


CN_Class

static final java.lang.String CN_Class
Class name of java.lang.Class


CN_StringIdentity

static final java.lang.String CN_StringIdentity
Class name of SingleFieldIdentity classes


CN_LongIdentity

static final java.lang.String CN_LongIdentity

CN_IntIdentity

static final java.lang.String CN_IntIdentity

CN_ShortIdentity

static final java.lang.String CN_ShortIdentity

CN_ByteIdentity

static final java.lang.String CN_ByteIdentity

CN_CharIdentity

static final java.lang.String CN_CharIdentity

CN_ObjectIdentity

static final java.lang.String CN_ObjectIdentity

CN_PersistenceManager

static final java.lang.String CN_PersistenceManager
Class name of javax.jdo.PersistenceManager


CN_ObjectIdFieldConsumer

static final java.lang.String CN_ObjectIdFieldConsumer
Class name of javax.jdo.spi.PersistenceCapable.ObjectIdFieldConsumer


CN_ObjectIdFieldSupplier

static final java.lang.String CN_ObjectIdFieldSupplier
Class name of javax.jdo.spi.PersistenceCapable.ObjectIdFieldSupplier


CN_IllegalArgumentException

static final java.lang.String CN_IllegalArgumentException
Class name of java.lang.IllegalArgumentException


CN_ClassCastException

static final java.lang.String CN_ClassCastException
Class name of java.lang.ClassCastException


CN_JDODetachedFieldAccessException

static final java.lang.String CN_JDODetachedFieldAccessException
Class name of javax.jdo.JDODetachedFieldAccessException


CN_IllegalStateException

static final java.lang.String CN_IllegalStateException
Class name of java.lang.IllegalStateException

Method Detail

validate

boolean validate()
Validate whether the class is enhanced.

Returns:
Return true if already enhanced class.

enhance

boolean enhance()
Method to enhance the class definition internally.

Returns:
Whether the class was enhanced successfully

save

void save(java.lang.String directoryName)
          throws java.io.IOException
Method to save the (current) class definition bytecode into a class file. Only has effect if the bytecode has been modified (by enhance()). If directoryName is specified it will be written to $directoryName/className.class else will overwrite the existing class.

Parameters:
directoryName - Name of a directory (or null to overwrite the class)
Throws:
java.io.IOException - If an I/O error occurs in the write.

getBytes

byte[] getBytes()
Access the class bytecode.

Returns:
the class in byte array format

getClassLoaderResolver

org.datanucleus.ClassLoaderResolver getClassLoaderResolver()
Accessor for the ClassLoaderResolver in use.

Returns:
ClassLoader resolver

getClassMetaData

org.datanucleus.metadata.ClassMetaData getClassMetaData()
Accessor for the ClassMetaData for the class.

Returns:
MetaData for the class


Copyright © 2009. All Rights Reserved.