public class MakeDirty extends ClassMethod
 public void dnMakeDirty(String fieldName)
 {
     if (dnStateManager != null)
         dnStateManager.makeDirty(this, fieldName);
     if (dnIsDetached() && fieldName != null) 
     {
         String fldName = null;
         if (fieldName.indexOf('.') ≥ 0)
             fldName = fieldName.substring(fieldName.lastIndexOf('.') + 1);
         else
             fldName = fieldName;
         for (int i = 0; i < dnFieldNames.length; i++) 
         {
             if (dnFieldNames[i].equals(fldName)) 
             {
                 if (((BitSet) dnDetachedState[2]).get(i + dnInheritedFieldCount))
                     ((BitSet) dnDetachedState[3]).set(i + dnInheritedFieldCount);
                 else
                     throw new JDODetachedFieldAccessException("You have just attempted to access a field/property");
                 break;
             }
         }
     }
 }
 
 and if not detachable
 public void dnMakeDirty(String fieldName)
 {
     if (dnStateManager != null)
         dnStateManager.makeDirty(this, fieldName);
 }
 
 TODO This currently doesnt cater for a fully-qualified field where the class name part
 doesnt define a field at that levelaccess, argNames, argTypes, enhancer, exceptions, methodName, returnType, visitor| Constructor and Description | 
|---|
MakeDirty(ClassEnhancer enhancer,
         String name,
         int access,
         Object returnType,
         Object[] argTypes,
         String[] argNames)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
execute()
Method to add the contents of the class method. 
 | 
static MakeDirty | 
getInstance(ClassEnhancer enhancer)  | 
close, equals, getAccess, getClassEnhancer, getDescriptor, getMethodAdditionMessage, getName, getNamer, hashCode, initialise, initialisepublic MakeDirty(ClassEnhancer enhancer, String name, int access, Object returnType, Object[] argTypes, String[] argNames)
enhancer - ClassEnhancername - Name of methodaccess - Access typereturnType - Return typeargTypes - Argument typesargNames - Argument namespublic static MakeDirty getInstance(ClassEnhancer enhancer)
public void execute()
execute in class ClassMethodCopyright © 2020. All rights reserved.