org.datanucleus.enhancer.asm.method
Class JdoNewInstance2
java.lang.Object
org.datanucleus.enhancer.ClassMethod
org.datanucleus.enhancer.asm.ASMClassMethod
org.datanucleus.enhancer.asm.method.JdoNewInstance2
public class JdoNewInstance2
- extends ASMClassMethod
Method to generate the method "jdoNewInstance" using ASM.
public PersistenceCapable jdoNewInstance(StateManager sm, Object o)
{
Answer result = new Answer();
result.jdoFlags = (byte) 1;
result.jdoStateManager = sm;
result.jdoCopyKeyFieldsFromObjectId(o);
return result;
}
and throw an exception when the class is abstract
- Version:
- $Revision: 1.7 $
|
Constructor Summary |
JdoNewInstance2(ClassEnhancer enhancer,
java.lang.String name,
int access,
java.lang.Object returnType,
java.lang.Object[] argTypes,
java.lang.String[] argNames)
Constructor. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
JdoNewInstance2
public JdoNewInstance2(ClassEnhancer enhancer,
java.lang.String name,
int access,
java.lang.Object returnType,
java.lang.Object[] argTypes,
java.lang.String[] argNames)
- Constructor.
- Parameters:
enhancer - ClassEnhancername - Name of methodaccess - Access typereturnType - Return typeargTypes - Argument typesargNames - Argument names
getInstance
public static JdoNewInstance2 getInstance(ClassEnhancer enhancer)
execute
public void execute()
- Method to add the contents of the class method.
- Specified by:
execute in class ClassMethod
Copyright © 2011. All Rights Reserved.