org.sourceforge.jemm.weaver.transformation
Class InterfaceTransformation

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

public class InterfaceTransformation
extends AbstractClassTransformation

Adds an "implements JEMMObject" to the passed in class.

Author:
Paul Keeble

Constructor Summary
InterfaceTransformation()
          Creates a new InterfaceTransformation.
 
Method Summary
 java.lang.String[] dependentTransforms()
          Has no dependent transforms and hence this returns an empty array.
 void transform(javassist.CtClass clazz)
          Adds the JEMMObject interface to the passed in class.
 
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

InterfaceTransformation

public InterfaceTransformation()
                        throws javassist.NotFoundException
Creates a new InterfaceTransformation.

Throws:
javassist.NotFoundException - If JEMMObject class can not be loaded from classpath
Method Detail

transform

public void transform(javassist.CtClass clazz)
               throws TransformationException
Adds the JEMMObject interface to the passed in class.

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

dependentTransforms

public java.lang.String[] dependentTransforms()
Has no dependent transforms and hence this returns an empty array.

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.