Class SetViaMediate


  • public class SetViaMediate
    extends ClassMethod
    Method to generate the method "dnSetZZZ" using ASM for MEDIATE_WRITE fields.
     static void dnSetZZZ(MyClass objPC, YYY zzz)
     {
         if (objPC.dnStateManager == null)
             objPC.ZZZ = zzz;
         else
             objPC.dnStateManager.setObjectField(objPC, 0, objPC.ZZZ, zzz);
         if (objPC.dnIsDetached() == true)
             ((BitSet) objPC.dnDetachedState[3]).set(0);
     }
     
    with the last part only applying when the class is Detachable
    • Constructor Detail

      • SetViaMediate

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

      • execute

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