org.datanucleus.enhancer.bcel.method
Class PropertyGetterMethod

java.lang.Object
  extended by org.datanucleus.enhancer.bcel.method.PropertyGetterMethod

public class PropertyGetterMethod
extends java.lang.Object

Enhance a persistent property setter

Version:
$Revision: 1.5 $

Field Summary
protected  java.lang.Object[] argTypes
          Types of the arguments.
protected  org.apache.bcel.generic.ClassGen classGen
          target ClassGen instance
protected  java.lang.String className
          target class name
protected  BCELClassMetaData cmd
          ClassMetaData for the class
protected  org.apache.bcel.generic.ConstantPoolGen constantPoolGen
          target ConstantPoolGen instance
protected  org.apache.bcel.generic.InstructionFactory factory
          InstructionFactory instance
protected  BCELFieldPropertyMetaData fieldConfig
          target field
protected  org.apache.bcel.generic.InstructionList il
          InstructionList instance
protected static org.datanucleus.util.Localiser LOCALISER
          Localisation of messages
protected  org.apache.bcel.classfile.Method method
          Method
protected  org.apache.bcel.generic.MethodGen methodGen
          MethodGen instance
protected  boolean synthetic
          is synthetic
 
Constructor Summary
PropertyGetterMethod(org.apache.bcel.classfile.Method m, java.lang.String className, org.apache.bcel.generic.ConstantPoolGen constantPoolGen, org.apache.bcel.generic.ClassGen newClass, org.apache.bcel.generic.Type[] argTypes, BCELFieldPropertyMetaData fieldConfig, BCELClassEnhancer enhancer)
          Constructor
 
Method Summary
protected  org.apache.bcel.generic.InstructionHandle createThrowException(java.lang.String newException, java.lang.String message)
          Helper method to create a throw exception instruction.
 void execute()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALISER

protected static org.datanucleus.util.Localiser LOCALISER
Localisation of messages


fieldConfig

protected BCELFieldPropertyMetaData fieldConfig
target field


il

protected org.apache.bcel.generic.InstructionList il
InstructionList instance


methodGen

protected org.apache.bcel.generic.MethodGen methodGen
MethodGen instance


synthetic

protected boolean synthetic
is synthetic


classGen

protected org.apache.bcel.generic.ClassGen classGen
target ClassGen instance


className

protected java.lang.String className
target class name


constantPoolGen

protected org.apache.bcel.generic.ConstantPoolGen constantPoolGen
target ConstantPoolGen instance


cmd

protected BCELClassMetaData cmd
ClassMetaData for the class


argTypes

protected java.lang.Object[] argTypes
Types of the arguments.


factory

protected org.apache.bcel.generic.InstructionFactory factory
InstructionFactory instance


method

protected org.apache.bcel.classfile.Method method
Method

Constructor Detail

PropertyGetterMethod

public PropertyGetterMethod(org.apache.bcel.classfile.Method m,
                            java.lang.String className,
                            org.apache.bcel.generic.ConstantPoolGen constantPoolGen,
                            org.apache.bcel.generic.ClassGen newClass,
                            org.apache.bcel.generic.Type[] argTypes,
                            BCELFieldPropertyMetaData fieldConfig,
                            BCELClassEnhancer enhancer)
Constructor

Parameters:
m - Method
className - Name of class
constantPoolGen - BCEL pool gen
newClass - the new class
argTypes - types of args to the method
fieldConfig - metadata for the field/property
enhancer - The enhancer
Method Detail

execute

public void execute()

createThrowException

protected org.apache.bcel.generic.InstructionHandle createThrowException(java.lang.String newException,
                                                                         java.lang.String message)
Helper method to create a throw exception instruction.
this method generate below code...
throw new [newExceptin param class]([message param]);

Parameters:
newException - throw exception
message - exception message
Returns:
first InstructionHandle


Copyright © 2009. All Rights Reserved.