|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openjpa.enhance.DynamicStorageGenerator
public class DynamicStorageGenerator
Factory for creating new DynamicStorage
classes. Can be
extended to decorate/modify the generated instances behavior.
Field Summary | |
---|---|
protected static int |
POLICY_EMPTY
Constant to not generate type set/get methods. |
protected static int |
POLICY_EXCEPTION
Constant to throw an exception on invalid index passed to type set/get methods |
protected static int |
POLICY_SILENT
Constant to be as silent as possible during invalid index passed to set/get type methods. |
Constructor Summary | |
---|---|
DynamicStorageGenerator()
|
Method Summary | |
---|---|
protected serp.bytecode.BCField |
addBeanField(serp.bytecode.BCClass bc,
String name,
Class type)
Add a bean field of the given name and type. |
protected DynamicStorage |
createFactory(serp.bytecode.BCClass bc)
Create a stub factory instance for the given class. |
protected void |
declareClasses(serp.bytecode.BCClass bc)
Add interface or superclass declarations to the generated class. |
protected void |
decorate(Object obj,
serp.bytecode.BCClass cls,
int[] types)
Decorate the generated class. |
protected Class |
forType(int type)
Return the proper type for the given JavaTypes constant. |
DynamicStorage |
generateStorage(int[] types,
Object obj)
Generate a generic DynamicStorage instance with the given
array of JavaTypes constants and the given object as
the user key for generation. |
protected String |
getClassName(Object obj)
Return a class name to use for the given user key. |
protected int |
getCreateFieldMethods(int type)
Return the policy constant for how to create type methods. |
protected int |
getFieldAccess()
Return the default field ACCESS constant for generated fields from Constants . |
protected String |
getFieldName(int index)
Return the name for the generated field at the given index. |
protected Class |
getWrapper(Class c)
Get the wrapper for the given type. |
protected Class |
getWrapper(int type)
get the wrapper for the given JavaTypes constant. |
protected boolean |
isCompatible(int fieldType,
int storageType)
Return true if the given field type and storage type are compatible. |
protected serp.bytecode.Code |
replaceMethod(serp.bytecode.BCClass bc,
String name,
Class retType,
Class[] args,
boolean remove)
Clear code associated with the given method signature, and return the empty code. |
protected serp.bytecode.Instruction |
throwException(serp.bytecode.Code code,
Class type)
Throw an exception of the given type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int POLICY_EXCEPTION
protected static final int POLICY_EMPTY
protected static final int POLICY_SILENT
Constructor Detail |
---|
public DynamicStorageGenerator()
Method Detail |
---|
public DynamicStorage generateStorage(int[] types, Object obj)
DynamicStorage
instance with the given
array of JavaTypes
constants and the given object as
the user key for generation.
protected String getClassName(Object obj)
protected int getFieldAccess()
Constants
.
protected String getFieldName(int index)
"field" + i
by default.
protected int getCreateFieldMethods(int type)
protected void decorate(Object obj, serp.bytecode.BCClass cls, int[] types)
protected DynamicStorage createFactory(serp.bytecode.BCClass bc)
protected void declareClasses(serp.bytecode.BCClass bc)
protected serp.bytecode.Code replaceMethod(serp.bytecode.BCClass bc, String name, Class retType, Class[] args, boolean remove)
protected serp.bytecode.BCField addBeanField(serp.bytecode.BCClass bc, String name, Class type)
protected boolean isCompatible(int fieldType, int storageType)
protected serp.bytecode.Instruction throwException(serp.bytecode.Code code, Class type)
protected Class forType(int type)
JavaTypes
constant.
protected Class getWrapper(int type)
JavaTypes
constant.
protected Class getWrapper(Class c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This documentation is deprecated and will be removed in the next release of WebLogic Server.