org.datanucleus.enhancer.asm.method
Class CheckWrite

java.lang.Object
  extended by org.datanucleus.enhancer.ClassMethod
      extended by org.datanucleus.enhancer.asm.ASMClassMethod
          extended by org.datanucleus.enhancer.asm.method.CheckWrite

public class CheckWrite
extends ASMClassMethod

Method to generate the method "jdoSetZZZ" using ASM for CHECK_WRITE fields.

 static void jdoSetZZZ(MyClass objPC, YYY zzz)
 {
     if (objPC.jdoFlags != 0 && objPC.jdoStateManager != null)
         objPC.jdoStateManager.setStringField(objPC, 2, objPC.ZZZ, zzz);
     else
     {
         objPC.ZZZ = zzz;
         if (objPC.jdoIsDetached() == true)
             ((BitSet) objPC.jdoDetachedState[3]).set(2);
     }
 }
 
with the last part only applying when Detachable

Version:
$Revision: 1.6 $

Field Summary
protected  org.datanucleus.metadata.AbstractMemberMetaData fmd
          Field that this jdoSetZZZ is for.
 
Fields inherited from class org.datanucleus.enhancer.asm.ASMClassMethod
visitor
 
Fields inherited from class org.datanucleus.enhancer.ClassMethod
access, argNames, argTypes, enhancer, exceptions, LOCALISER, methodName, returnType
 
Constructor Summary
CheckWrite(ClassEnhancer enhancer, org.datanucleus.metadata.AbstractMemberMetaData fmd)
          Constructor.
 
Method Summary
 void execute()
          Method to add the contents of the class method.
 
Methods inherited from class org.datanucleus.enhancer.asm.ASMClassMethod
getClassEnhancer, getDescriptor, initialise, initialise
 
Methods inherited from class org.datanucleus.enhancer.ClassMethod
close, equals, getAccess, getMethodAdditionMessage, getName, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fmd

protected org.datanucleus.metadata.AbstractMemberMetaData fmd
Field that this jdoSetZZZ is for.

Constructor Detail

CheckWrite

public CheckWrite(ClassEnhancer enhancer,
                  org.datanucleus.metadata.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


Copyright © 2009. All Rights Reserved.