org.datanucleus.enhancer.bcel.method
Class JdoGetManagedFieldCount

java.lang.Object
  extended by org.datanucleus.enhancer.ClassMethod
      extended by org.datanucleus.enhancer.bcel.BCELClassMethod
          extended by org.datanucleus.enhancer.bcel.method.JdoGetManagedFieldCount

public class JdoGetManagedFieldCount
extends BCELClassMethod

The generated method returns the number of managed fields in this class plus the number of inherited managed fields. This method is expected to be executed only during class loading of the subclasses.

Since:
1.0.0
Version:
$Revision: 1.7 $

Field Summary
 
Fields inherited from class org.datanucleus.enhancer.bcel.BCELClassMethod
classGen, className, cmd, constantPoolGen, factory, il, LOCALISER, methodGen, synthetic
 
Fields inherited from class org.datanucleus.enhancer.ClassMethod
access, argNames, argTypes, enhancer, exceptions, methodName, returnType
 
Constructor Summary
JdoGetManagedFieldCount(java.lang.String methodName, int type, org.apache.bcel.generic.Type resultType, org.apache.bcel.generic.Type[] argType, java.lang.String[] argName, boolean synthetic, BCELClassEnhancer gen)
           
 
Method Summary
 void execute()
          Usually this method should generate bytecode as: return jdoFieldNames.length + superClass.jdoGetManagedFieldCount(); but due to initializing issues [ENHANCER-58], we use constants instead, e.g.: return +superClass.jdoGetManagedFieldCount();
static JdoGetManagedFieldCount getInstance(BCELClassEnhancer gen)
           
 
Methods inherited from class org.datanucleus.enhancer.bcel.BCELClassMethod
close, createThrowException, createThrowException, getClassEnhancer, initialise
 
Methods inherited from class org.datanucleus.enhancer.ClassMethod
equals, getAccess, getMethodAdditionMessage, getName, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdoGetManagedFieldCount

public JdoGetManagedFieldCount(java.lang.String methodName,
                               int type,
                               org.apache.bcel.generic.Type resultType,
                               org.apache.bcel.generic.Type[] argType,
                               java.lang.String[] argName,
                               boolean synthetic,
                               BCELClassEnhancer gen)
Parameters:
methodName -
type -
resultType -
argType -
argName -
synthetic -
gen -
Method Detail

getInstance

public static JdoGetManagedFieldCount getInstance(BCELClassEnhancer gen)

execute

public void execute()
Usually this method should generate bytecode as: return jdoFieldNames.length + superClass.jdoGetManagedFieldCount(); but due to initializing issues [ENHANCER-58], we use constants instead, e.g.: return +superClass.jdoGetManagedFieldCount();

Overrides:
execute in class BCELClassMethod


Copyright © 2009. All Rights Reserved.