Class GetManagedFieldCount

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

public class GetManagedFieldCount extends ClassMethod
Method to generate the method "dnGetManagedFieldCount" using ASM.
  • Constructor Details

    • GetManagedFieldCount

      public GetManagedFieldCount(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

    • getInstance

      public static GetManagedFieldCount getInstance(ClassEnhancer enhancer)
    • execute

      public void execute()
      Method to add the contents of the class method. Usually this method should generate bytecode as: return dnFieldNames.length + superClass.dnGetManagedFieldCount(); but due to initializing issues [ENHANCER-58], we use constants instead, e.g.: return {number of managed fields}+superClass.dnGetManagedFieldCount();
      Specified by:
      execute in class ClassMethod