org.sourceforge.jemm.weaver.transformation
Class SynchronizedBlockTransformation

java.lang.Object
  extended by org.sourceforge.jemm.weaver.transformation.AbstractClassTransformation
      extended by org.sourceforge.jemm.weaver.transformation.SynchronizedBlockTransformation
All Implemented Interfaces:
Transformation

public class SynchronizedBlockTransformation
extends AbstractClassTransformation

Finds and replaces all the synchronized blocks with paired calls of beginLock(Object)/endLock(Object)

Author:
Paul Keeble
See Also:
for more details on how the transformation happens.

Constructor Summary
SynchronizedBlockTransformation()
          Create a new SynchronizedBlockTransformation
 
Method Summary
 java.lang.String[] dependentTransforms()
          Dependent on ShadowTransformation
 void transform(javassist.CtClass clazz)
          Modifies the passed in CtClass based on the transformation necessary.
 
Methods inherited from class org.sourceforge.jemm.weaver.transformation.AbstractClassTransformation
equals, getTransformationName, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SynchronizedBlockTransformation

public SynchronizedBlockTransformation()
Create a new SynchronizedBlockTransformation

Method Detail

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
See Also:
TransformSynchronized#transform(CtClass, int, javassist.bytecode.CodeIterator, javassist.bytecode.ConstPool)

dependentTransforms

public java.lang.String[] dependentTransforms()
Dependent on ShadowTransformation

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.