org.sourceforge.jemm.weaver.transformation
Class MethodProxyTransformation
java.lang.Object
org.sourceforge.jemm.weaver.transformation.AbstractClassTransformation
org.sourceforge.jemm.weaver.transformation.MethodProxyTransformation
- All Implemented Interfaces:
- Transformation
public class MethodProxyTransformation
- extends AbstractClassTransformation
Proxies all methods a begin and end call. Also detects synchronisation and
adds in calls for begin and end Lock.
beginLock and endLock calls are only present if the method was declared
synchronised.
Produces code similar to: jemmLCL.beginMethod(this); jemmLVL.beginLock(this);
try { //original code } finally { jemmLVL.endLock(this);
jemmLCL.endMethod(this); }
- Author:
- Paul Keeble
Method Summary |
java.lang.String[] |
dependentTransforms()
Should return a list of the transformations that this transform requires before
it can execute on a class. |
void |
transform(javassist.CtClass clazz)
Modifies the passed in CtClass based on the transformation necessary. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
MethodProxyTransformation
public MethodProxyTransformation()
transform
public void transform(javassist.CtClass clazz)
throws TransformationException
- Description copied from interface:
Transformation
- Modifies the passed in CtClass based on the transformation necessary.
- Specified by:
transform
in interface Transformation
- Specified by:
transform
in class AbstractClassTransformation
- Parameters:
clazz
- The CtClass to modify
- Throws:
TransformationException
- If an error occurs in the transformation process
dependentTransforms
public java.lang.String[] dependentTransforms()
- Description copied from interface:
Transformation
- Should return a list of the transformations that this transform requires before
it can execute on a class.
For the core Transformations this is equal to getClass().getSimpleName().
- Specified by:
dependentTransforms
in interface Transformation
- Specified by:
dependentTransforms
in class AbstractClassTransformation
- Returns:
- A list of transforms that must run first.
Copyright © 2009. All Rights Reserved.