org.jboss.aop.instrument
Class NonOptimizedFieldAccessTransformer

java.lang.Object
  extended by org.jboss.aop.instrument.FieldAccessTransformer
      extended by org.jboss.aop.instrument.NonOptimizedFieldAccessTransformer

public class NonOptimizedFieldAccessTransformer
extends FieldAccessTransformer

Comment

Version:
$Revision$
Author:
Kabir Khan

Nested Class Summary
protected  class NonOptimizedFieldAccessTransformer.NonOptimizedFieldAccessExprEditor
           
 
Nested classes/interfaces inherited from class org.jboss.aop.instrument.FieldAccessTransformer
FieldAccessTransformer.FieldAccessExprEditor
 
Field Summary
 
Fields inherited from class org.jboss.aop.instrument.FieldAccessTransformer
GET_INDEX, SET_INDEX, transformations, wrapper
 
Constructor Summary
NonOptimizedFieldAccessTransformer(Instrumentor instrumentor)
           
 
Method Summary
protected  void doBuildFieldWrappers(javassist.CtClass clazz, javassist.CtField field, int fieldIndex, boolean shouldReplaceArrayAccess, JoinpointClassification classificationGet, JoinpointClassification classificationSet)
           
protected  String getWrapperBody(javassist.CtClass clazz, javassist.CtField field, boolean get, int index)
          Returns the wrapper body of the field joinpoint.
protected  void replaceFieldAccessInternally(javassist.CtClass clazz, javassist.CtField field, boolean doGet, boolean doSet, int index)
          This function replaces internal field accesses with bytecode hooks into framework todo this must do it for inherited protected/public fields as well
 
Methods inherited from class org.jboss.aop.instrument.FieldAccessTransformer
addFieldReadInfoFieldWithAccessors, addFieldReadInfoFieldWithAccessors, addFieldWriteInfoField, addFieldWriteInfoField, addInfoAsWeakReference, buildFieldWrappers, buildReadWrapperPlaceHolder, buildWrapperPlaceHolders, buildWriteWrapperPlaceHolder, codeConverted, fieldInfoFromWeakReference, fieldOffset, fieldRead, fieldWrite, getArrayWriteRegistration, getFieldReadInfoFieldName, getFieldWriteInfoFieldName, getStaticModifiers, getWrapperReadMethod, getWrapperWriteMethod, isPrepared, markInfoAsSynthetic, replaceFieldAccess, unwrap, wrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NonOptimizedFieldAccessTransformer

public NonOptimizedFieldAccessTransformer(Instrumentor instrumentor)
Method Detail

doBuildFieldWrappers

protected void doBuildFieldWrappers(javassist.CtClass clazz,
                                    javassist.CtField field,
                                    int fieldIndex,
                                    boolean shouldReplaceArrayAccess,
                                    JoinpointClassification classificationGet,
                                    JoinpointClassification classificationSet)
                             throws javassist.NotFoundException,
                                    javassist.CannotCompileException
Specified by:
doBuildFieldWrappers in class FieldAccessTransformer
Throws:
javassist.NotFoundException
javassist.CannotCompileException

getWrapperBody

protected String getWrapperBody(javassist.CtClass clazz,
                                javassist.CtField field,
                                boolean get,
                                int index)
                         throws javassist.NotFoundException,
                                javassist.CannotCompileException
Description copied from class: FieldAccessTransformer
Returns the wrapper body of the field joinpoint.

Specified by:
getWrapperBody in class FieldAccessTransformer
Parameters:
clazz - the class declaring field.
field - the field whose joinpoint wrapper code will be generated.
get - indicates if the wrapper is a field read wrapper or a field write wrapper.
index - the index of field.
Returns:
teh wrapper body code.
Throws:
javassist.NotFoundException
javassist.CannotCompileException

replaceFieldAccessInternally

protected void replaceFieldAccessInternally(javassist.CtClass clazz,
                                            javassist.CtField field,
                                            boolean doGet,
                                            boolean doSet,
                                            int index)
                                     throws javassist.CannotCompileException
Description copied from class: FieldAccessTransformer
This function replaces internal field accesses with bytecode hooks into framework todo this must do it for inherited protected/public fields as well

Specified by:
replaceFieldAccessInternally in class FieldAccessTransformer
Throws:
javassist.CannotCompileException


Copyright © 2008 JBoss, a division of Red Hat, Inc.. All Rights Reserved.