Class PCDataGenerator
java.lang.Object
org.apache.openjpa.enhance.DynamicStorageGenerator
org.apache.openjpa.enhance.PCDataGenerator
- Direct Known Subclasses:
DataCachePCDataGenerator
Generates
PCData instances which avoid primitive wrappers
to optimize memory use and performance at the cost of slightly higher
startup time.- Since:
- 0.3.2
- Author:
- Steve Kim, Mark Struberg rework to ASM
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDynamicPCDatas generated will implement this interface to simplify initialization. -
Field Summary
FieldsFields inherited from class DynamicStorageGenerator
POLICY_EMPTY, POLICY_EXCEPTION, POLICY_SILENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdd methods for loading and storing version data.protected voidAdd interface or superclass declarations to the generated class.protected final voiddecorate(Object obj, ClassNodeTracker bc, int[] types) Decorate the generated class.protected voiddecorate(ClassNodeTracker bc, ClassMetaData meta) Apply additional decoration to generated class.protected voidfinish(PCDataGenerator.DynamicPCData data, ClassMetaData meta) Perform any final actions before the pcdata is returned to client code.generatePCData(Object oid, ClassMetaData meta) Return aPCDatainstance for the given oid and metadata.protected final StringgetClassName(Object obj) Return a class name to use for the given user key.Return the configuration.protected intgetCreateFieldMethods(int typeCode) Return the policy constant for how to create type methods.static Class<?> protected StringgetUniqueName(Class<?> type) Creates a unique name for the given type's pcdata implementation.protected intreplaceType(FieldMetaData fmd) Return a validJavaTypesconstant for the given fieldprotected booleanusesImplData(ClassMetaData meta) Whether the given type might have cacheable class-level impl data.protected booleanWhether the given field might have cacheable impl data.protected booleanWhether the given field uses a cacheable intermediate value.Methods inherited from class DynamicStorageGenerator
addBeanField, createFactory, forType, generateStorage, getFieldAccess, getFieldName, getWrapper, getWrapper, isCompatible
-
Field Details
-
POSTFIX
- See Also:
-
-
Constructor Details
-
PCDataGenerator
-
-
Method Details
-
getConfiguration
Return the configuration. -
generatePCData
Return aPCDatainstance for the given oid and metadata. -
finish
Perform any final actions before the pcdata is returned to client code. -
getCreateFieldMethods
protected int getCreateFieldMethods(int typeCode) Description copied from class:DynamicStorageGeneratorReturn the policy constant for how to create type methods.- Overrides:
getCreateFieldMethodsin classDynamicStorageGenerator
-
declareClasses
Description copied from class:DynamicStorageGeneratorAdd interface or superclass declarations to the generated class.- Overrides:
declareClassesin classDynamicStorageGenerator
-
getClassName
Description copied from class:DynamicStorageGeneratorReturn a class name to use for the given user key. By default, returns the stringified key prefixed by PREFIX.- Overrides:
getClassNamein classDynamicStorageGenerator
-
getUniqueName
-
decorate
Description copied from class:DynamicStorageGeneratorDecorate the generated class.- Overrides:
decoratein classDynamicStorageGenerator
-
decorate
Apply additional decoration to generated class. -
getType
-
addVersionMethods
Add methods for loading and storing version data. -
replaceType
Return a validJavaTypesconstant for the given field -
usesIntermediate
Whether the given field uses a cacheable intermediate value. -
usesImplData
Whether the given type might have cacheable class-level impl data. -
usesImplData
Whether the given field might have cacheable impl data.
-