org.jboss.aop.instrument
Class OptimizedFieldAccessTransformer
java.lang.Object
org.jboss.aop.instrument.FieldAccessTransformer
org.jboss.aop.instrument.OptimizedFieldAccessTransformer
public class OptimizedFieldAccessTransformer
- extends FieldAccessTransformer
Comment
- Version:
- $Revision$
- Author:
- Kabir Khan
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 body of the optimized wrapper method. |
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 |
OptimizedFieldAccessTransformer
public OptimizedFieldAccessTransformer(Instrumentor instrumentor)
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
- Returns the body of the optimized wrapper method.
- Specified by:
getWrapperBody
in class FieldAccessTransformer
- Parameters:
clazz
- the class declaring field
.field
- the field whose joinpoint wrapper body will be returned.get
- indicates if the wrapper is a field read wrapper or a field
write wrapper.index
- the field
index.
- Returns:
- the optimized wrapper body.
- 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.