public abstract class MethodExecutionTransformer extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
MethodExecutionTransformer.MethodTransformation |
Modifier and Type | Field and Description |
---|---|
protected Instrumentor |
instrumentor |
static String |
METHOD_INFO_CLASS_NAME |
Modifier | Constructor and Description |
---|---|
protected |
MethodExecutionTransformer(Instrumentor instrumentor) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
addInfoAsWeakReference() |
protected String |
addMethodInfoField(int modifiers,
javassist.CtClass addTo,
MethodExecutionTransformer.MethodTransformation trans)
Adds a MethodInfo field to the passed in class
|
protected String |
addMethodInfoField(int modifiers,
javassist.CtClass addTo,
MethodExecutionTransformer.MethodTransformation trans,
javassist.CtField.Initializer init)
Adds a MethodInfo field to the passed in class
|
protected abstract void |
doWrap(MethodExecutionTransformer.MethodTransformation trans,
String methodInfoFieldName) |
protected static String |
getAopReturnStr(boolean isVoid) |
protected static String |
getAopReturnStr(javassist.CtMethod method) |
protected JoinpointClassifier |
getClassifier() |
static String |
getMethodInfoFieldName(String methodName,
long methodHash) |
static String |
getMethodNameHash(String methodName,
long methodHash) |
protected static String |
getReturnStr(boolean isVoid) |
protected static String |
getReturnStr(javassist.CtMethod method) |
protected static WrapperTransformer |
getWrapper() |
void |
instrument(javassist.CtClass clazz,
ClassAdvisor advisor) |
protected boolean |
markInfoAsSynthetic() |
protected static String |
methodInfoFromWeakReference(String localName,
String methodInfoName) |
protected void |
moveAnnotationsAndCopySignature(boolean copySignature,
javassist.CtMethod src,
javassist.CtMethod dest) |
protected abstract void |
transformMethod(MethodExecutionTransformer.MethodTransformation trans,
boolean wrap) |
void |
unwrap(javassist.CtClass clazz,
Collection<MethodInfo> methodInfos)
Unwraps the method executions contained in
methodInfos . |
void |
wrap(javassist.CtClass clazz,
Collection<MethodInfo> methodInfos)
Wraps the method executions contained in
methodInfos . |
public static final String METHOD_INFO_CLASS_NAME
protected Instrumentor instrumentor
protected MethodExecutionTransformer(Instrumentor instrumentor)
protected static WrapperTransformer getWrapper()
protected JoinpointClassifier getClassifier()
protected String addMethodInfoField(int modifiers, javassist.CtClass addTo, MethodExecutionTransformer.MethodTransformation trans) throws javassist.NotFoundException, javassist.CannotCompileException
javassist.NotFoundException
javassist.CannotCompileException
protected String addMethodInfoField(int modifiers, javassist.CtClass addTo, MethodExecutionTransformer.MethodTransformation trans, javassist.CtField.Initializer init) throws javassist.NotFoundException, javassist.CannotCompileException
javassist.NotFoundException
javassist.CannotCompileException
protected boolean addInfoAsWeakReference()
protected boolean markInfoAsSynthetic()
public static String getMethodInfoFieldName(String methodName, long methodHash)
protected static String methodInfoFromWeakReference(String localName, String methodInfoName)
public void instrument(javassist.CtClass clazz, ClassAdvisor advisor) throws javassist.NotFoundException, javassist.CannotCompileException
javassist.NotFoundException
javassist.CannotCompileException
public void wrap(javassist.CtClass clazz, Collection<MethodInfo> methodInfos) throws Exception
methodInfos
.clazz
- the class being instrumented.constructorIndexes
- a collection of org.jboss.aop.MethodInfo
indentifying
the methods to be wrapped.Exception
public void unwrap(javassist.CtClass clazz, Collection<MethodInfo> methodInfos) throws Exception
methodInfos
.clazz
- the class being instrumented.constructorIndexes
- a collection of org.jboss.aop.MethodInfo
indentifying
the methods to be unwrapped.Exception
protected void moveAnnotationsAndCopySignature(boolean copySignature, javassist.CtMethod src, javassist.CtMethod dest) throws javassist.NotFoundException
javassist.NotFoundException
protected static String getAopReturnStr(javassist.CtMethod method) throws javassist.NotFoundException
javassist.NotFoundException
protected static String getAopReturnStr(boolean isVoid) throws javassist.NotFoundException
javassist.NotFoundException
protected static String getReturnStr(javassist.CtMethod method) throws javassist.NotFoundException
javassist.NotFoundException
protected static String getReturnStr(boolean isVoid) throws javassist.NotFoundException
javassist.NotFoundException
protected abstract void transformMethod(MethodExecutionTransformer.MethodTransformation trans, boolean wrap) throws javassist.CannotCompileException, javassist.NotFoundException
javassist.CannotCompileException
javassist.NotFoundException
protected abstract void doWrap(MethodExecutionTransformer.MethodTransformation trans, String methodInfoFieldName) throws javassist.NotFoundException, Exception
javassist.NotFoundException
Exception
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.