Class NewInstance1

java.lang.Object
org.datanucleus.enhancer.ClassMethod
org.datanucleus.enhancer.methods.NewInstance1

public class NewInstance1 extends ClassMethod
Method to generate the method "dnNewInstance" using ASM.
 public Persistable dnNewInstance(StateManager sm)
 {
     MyClass result = new MyClass();
     result.dnFlags = (byte) 1;
     result.dnStateManager = sm;
     return result;
 }
 
and throw an exception when the class is abstract.
  • Constructor Details

    • NewInstance1

      public NewInstance1(ClassEnhancer enhancer, String name, int access, Object returnType, Object[] argTypes, String[] argNames)
      Constructor.
      Parameters:
      enhancer - ClassEnhancer
      name - Name of method
      access - Access type
      returnType - Return type
      argTypes - Argument types
      argNames - Argument names
  • Method Details