org.jboss.aop.eclipsesupport
Class EclipseTestTransformer
java.lang.Object
org.jboss.aop.eclipsesupport.EclipseTestTransformer
- All Implemented Interfaces:
- java.lang.instrument.ClassFileTransformer
public class EclipseTestTransformer
- extends Object
- implements java.lang.instrument.ClassFileTransformer
A transformer to weave the main method of the org.eclipse.jdt.internal.junit.runner.RemoteTestRunner, so that we can deploy the correct
-aop.xml files before the test case class itself is loaded when running within Eclipse
- Version:
- $Revision: 44099 $
- Author:
- Bill Burke
Field Summary |
static String |
CLASSLOADER_DEPLOYED_XML
If running from within Eclipse with the -javaagent:eclipse-agent.jar switch set, the EclipseTestTransformer weaves the
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner class to set this system property to the name of the test class
run. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASSLOADER_DEPLOYED_XML
public static final String CLASSLOADER_DEPLOYED_XML
- If running from within Eclipse with the -javaagent:eclipse-agent.jar switch set, the EclipseTestTransformer weaves the
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner class to set this system property to the name of the test class
run.
- See Also:
- Constant Field Values
EclipseTestTransformer
public EclipseTestTransformer()
transform
public byte[] transform(ClassLoader loader,
String className,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] classfileBuffer)
throws java.lang.instrument.IllegalClassFormatException
- Specified by:
transform
in interface java.lang.instrument.ClassFileTransformer
- Throws:
java.lang.instrument.IllegalClassFormatException
recordClassNameAndDeployXml
public static void recordClassNameAndDeployXml(String[] args)
throws Exception
- Throws:
Exception
deployXmlForEclipse
public static void deployXmlForEclipse(String testClass)
throws Exception
- This will be initiated from the woven RemoteTestRunner classs to deploy the xml for the testcase UNLESS
the jboss.aop.path system property has been set.
- Throws:
Exception
Copyright © 2004 JBoss Inc. All Rights Reserved.