Class GetViaCheck

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

public class GetViaCheck extends ClassMethod
Method to generate the method "dnGetZZZ" using ASM for CHECK_READ fields.
 static YYY dnGetZZZ(MyClass objPC)
 {
     if (objPC.dnFlags > 0 && objPC.dnStateManager != null && !objPC.dnStateManager.isLoaded(objPC, 2))
         return objPC.dnStateManager.getStringField(objPC, 2, objPC.ZZZ);
     if (objPC.dnIsDetached() != false && ((BitSet)objPC.dnDetachedState[2]).get(2) != true)
         throw new JDODetachedFieldAccessException
             ("You have just attempted to access field \"ZZZ\" yet this field was not detached ... ");
     return objPC.ZZZ;
 }
 
with the last part only applying when Detachable
  • Field Details

  • Constructor Details

    • GetViaCheck

      public GetViaCheck(ClassEnhancer enhancer, AbstractMemberMetaData fmd)
      Constructor.
      Parameters:
      enhancer - ClassEnhancer
      fmd - MetaData for the field we are generating for
  • Method Details

    • execute

      public void execute()
      Method to add the contents of the class method.
      Specified by:
      execute in class ClassMethod