public class PCDataGenerator extends DynamicStorageGenerator
PCData
instances which avoid primitive wrappers
to optimize memory use and performance at the cost of slightly higher
startup time.Modifier and Type | Class and Description |
---|---|
static interface |
PCDataGenerator.DynamicPCData
Dynamic
PCData s generated will implement this interface
to simplify initialization. |
Modifier and Type | Field and Description |
---|---|
protected static String |
POSTFIX |
POLICY_EMPTY, POLICY_EXCEPTION, POLICY_SILENT
Constructor and Description |
---|
PCDataGenerator(OpenJPAConfiguration conf) |
Modifier and Type | Method and Description |
---|---|
protected void |
addVersionMethods(serp.bytecode.BCClass bc)
Add methods for loading and storing version data.
|
protected void |
callAbstractPCData(serp.bytecode.BCClass bc,
String name,
Class<?> retType,
Class<?>[] args)
Add method which defers to AbstractPCData.
|
protected void |
declareClasses(serp.bytecode.BCClass bc)
Add interface or superclass declarations to the generated class.
|
protected void |
decorate(serp.bytecode.BCClass bc,
ClassMetaData meta)
Apply additional decoration to generated class.
|
protected void |
decorate(Object obj,
serp.bytecode.BCClass bc,
int[] types)
Decorate the generated class.
|
protected void |
finish(PCDataGenerator.DynamicPCData data,
ClassMetaData meta)
Perform any final actions before the pcdata is returned to client code.
|
PCData |
generatePCData(Object oid,
ClassMetaData meta)
Return a
PCData instance for the given oid and metadata. |
protected String |
getClassName(Object obj)
Return a class name to use for the given user key.
|
OpenJPAConfiguration |
getConfiguration()
Return the configuration.
|
protected int |
getCreateFieldMethods(int typeCode)
Return the policy constant for how to create type methods.
|
protected String |
getUniqueName(Class<?> type)
Creates a unique name for the given type's pcdata implementation.
|
protected int |
replaceType(FieldMetaData fmd)
Return a valid
JavaTypes constant for the given field |
protected void |
setTarget(serp.bytecode.Instruction ins,
Collection<serp.bytecode.Instruction> jumps)
Set the collection of
JumpInstruction s to the given instruction,
clearing the collection in the process. |
protected boolean |
usesImplData(ClassMetaData meta)
Whether the given type might have cacheable class-level impl data.
|
protected boolean |
usesImplData(FieldMetaData fmd)
Whether the given field might have cacheable impl data.
|
protected boolean |
usesIntermediate(FieldMetaData fmd)
Whether the given field uses a cacheable intermediate value.
|
addBeanField, createFactory, forType, generateStorage, getFieldAccess, getFieldName, getWrapper, getWrapper, isCompatible, replaceMethod, throwException
protected static final String POSTFIX
public PCDataGenerator(OpenJPAConfiguration conf)
public OpenJPAConfiguration getConfiguration()
public PCData generatePCData(Object oid, ClassMetaData meta)
PCData
instance for the given oid and metadata.protected void finish(PCDataGenerator.DynamicPCData data, ClassMetaData meta)
protected int getCreateFieldMethods(int typeCode)
DynamicStorageGenerator
getCreateFieldMethods
in class DynamicStorageGenerator
protected void declareClasses(serp.bytecode.BCClass bc)
DynamicStorageGenerator
declareClasses
in class DynamicStorageGenerator
protected final String getClassName(Object obj)
DynamicStorageGenerator
getClassName
in class DynamicStorageGenerator
protected String getUniqueName(Class<?> type)
protected final void decorate(Object obj, serp.bytecode.BCClass bc, int[] types)
DynamicStorageGenerator
decorate
in class DynamicStorageGenerator
protected void decorate(serp.bytecode.BCClass bc, ClassMetaData meta)
protected void addVersionMethods(serp.bytecode.BCClass bc)
protected int replaceType(FieldMetaData fmd)
JavaTypes
constant for the given fieldprotected boolean usesIntermediate(FieldMetaData fmd)
protected boolean usesImplData(ClassMetaData meta)
protected boolean usesImplData(FieldMetaData fmd)
protected void callAbstractPCData(serp.bytecode.BCClass bc, String name, Class<?> retType, Class<?>[] args)
protected void setTarget(serp.bytecode.Instruction ins, Collection<serp.bytecode.Instruction> jumps)
JumpInstruction
s to the given instruction,
clearing the collection in the process.Copyright © 2006–2018 Apache Software Foundation. All rights reserved.