org.sourceforge.jemm.weaver.analysis
Class TransformationChain

java.lang.Object
  extended by org.sourceforge.jemm.weaver.analysis.TransformationChain
All Implemented Interfaces:
Transformation

public class TransformationChain
extends java.lang.Object
implements Transformation

A number of transformations that are run in order.

Author:
Paul Keeble

Constructor Summary
TransformationChain(Transformation[] transforms)
          Creates a chain where the transforms will be run in the order of the array passed.
 
Method Summary
 java.lang.String[] dependentTransforms()
          Always returns a zero length array.
 java.lang.String getTransformationName()
          Always returns chain.
 Transformation[] getTransforms()
          Returns an array containing the transformations.
 void transform(javassist.CtClass clazz)
          Executes all transformations in order one after the other.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sourceforge.jemm.weaver.transformation.Transformation
equals, hashCode
 

Constructor Detail

TransformationChain

public TransformationChain(Transformation[] transforms)
Creates a chain where the transforms will be run in the order of the array passed.

Parameters:
transforms - The transformations to use
Method Detail

getTransforms

public Transformation[] getTransforms()
Returns an array containing the transformations.

Returns:
The transformations underpinning this chain

dependentTransforms

public java.lang.String[] dependentTransforms()
Always returns a zero length array.

Specified by:
dependentTransforms in interface Transformation
Returns:
A list of transforms that must run first.

getTransformationName

public java.lang.String getTransformationName()
Always returns chain.

Specified by:
getTransformationName in interface Transformation
Returns:
The name of the transformation used in dependency matching

transform

public void transform(javassist.CtClass clazz)
               throws TransformationException
Executes all transformations in order one after the other.

Specified by:
transform in interface Transformation
Parameters:
clazz - The CtClass to modify
Throws:
TransformationException - If an error occurs in the transformation process


Copyright © 2009. All Rights Reserved.