- java.lang.Object
- 
- org.datanucleus.enhancer.ClassMethod
- 
- org.datanucleus.enhancer.methods.Clone
 
 
- 
 public class Clone extends ClassMethod Method to generate a default "clone" method, using ASM, that has the effect of nulling the state manager etc.public Object clone() throws CloneNotSupportedException { MyClass copy = (MyClass) super.clone(); copy.dnFlags = (byte) 0; copy.dnStateManager = null; return copy; }
- 
- 
Field Summary- 
Fields inherited from class org.datanucleus.enhancer.ClassMethodaccess, argNames, argTypes, enhancer, exceptions, methodName, returnType, visitor
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()Method to add the contents of the method.static ClonegetInstance(ClassEnhancer enhancer)- 
Methods inherited from class org.datanucleus.enhancer.ClassMethodclose, equals, getAccess, getClassEnhancer, getDescriptor, getMethodAdditionMessage, getName, getNamer, hashCode, initialise, initialise
 
- 
 
- 
- 
- 
Constructor Detail- 
Clonepublic Clone(ClassEnhancer enhancer, String name, int access, Object returnType, Object[] argTypes, String[] argNames, String[] exceptions) Constructor.- Parameters:
- enhancer- ClassEnhancer
- name- Name of method
- access- Access type
- returnType- Return type
- argTypes- Argument types
- argNames- Argument names
- exceptions- Any exceptions thrown
 
 
- 
 - 
Method Detail- 
getInstancepublic static Clone getInstance(ClassEnhancer enhancer) 
 - 
executepublic void execute() Method to add the contents of the method.- Specified by:
- executein class- ClassMethod
 
 
- 
 
-