Class JUnit3Reflector
- java.lang.Object
-
- org.apache.maven.surefire.common.junit3.JUnit3Reflector
-
public final class JUnit3Reflector extends java.lang.Object
Reflection facade for JUnit3 classes
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
ADD_LISTENER_METHOD
private java.lang.reflect.Method
addListenerMethod
private static java.lang.Class[]
EMPTY_CLASS_ARRAY
private static java.lang.Object[]
EMPTY_OBJECT_ARRAY
private java.lang.Class[]
interfacesImplementedByDynamicProxy
private static java.lang.String
RUN_METHOD
private static java.lang.String
TEST
private static java.lang.String
TEST_CASE
private static java.lang.String
TEST_LISTENER
private static java.lang.String
TEST_RESULT
private static java.lang.String
TEST_SUITE
private java.lang.Class<?>
testCase
private java.lang.Class<?>
testInterface
private java.lang.reflect.Method
testInterfaceRunMethod
private java.lang.Class<?>
testResultClass
private java.lang.reflect.Constructor
testsSuiteConstructor
-
Constructor Summary
Constructors Constructor Description JUnit3Reflector(java.lang.ClassLoader testClassLoader)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
constructTestObject(java.lang.Class testClass)
private static java.lang.Object
createInstanceFromSuiteMethod(java.lang.Class<?> testClass)
java.lang.reflect.Method
getAddListenerMethod()
java.lang.Class[]
getInterfacesImplementedByDynamicProxy()
private static java.lang.reflect.Method
getMethod(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Class<?>... parameters)
java.lang.reflect.Method
getRunMethod(java.lang.Class<?> testClass)
private static java.lang.reflect.Constructor
getTestConstructor(java.lang.Class<?> testClass)
java.lang.Class<?>
getTestInterface()
java.lang.reflect.Method
getTestInterfaceRunMethod()
java.lang.Class<?>
getTestResultClass()
boolean
isJUnit3Available()
private static java.lang.reflect.Method
tryGetMethod(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Class<?>... parameters)
-
-
-
Field Detail
-
TEST_CASE
private static final java.lang.String TEST_CASE
- See Also:
- Constant Field Values
-
TEST_RESULT
private static final java.lang.String TEST_RESULT
- See Also:
- Constant Field Values
-
TEST_LISTENER
private static final java.lang.String TEST_LISTENER
- See Also:
- Constant Field Values
-
TEST
private static final java.lang.String TEST
- See Also:
- Constant Field Values
-
ADD_LISTENER_METHOD
private static final java.lang.String ADD_LISTENER_METHOD
- See Also:
- Constant Field Values
-
RUN_METHOD
private static final java.lang.String RUN_METHOD
- See Also:
- Constant Field Values
-
TEST_SUITE
private static final java.lang.String TEST_SUITE
- See Also:
- Constant Field Values
-
EMPTY_CLASS_ARRAY
private static final java.lang.Class[] EMPTY_CLASS_ARRAY
-
EMPTY_OBJECT_ARRAY
private static final java.lang.Object[] EMPTY_OBJECT_ARRAY
-
interfacesImplementedByDynamicProxy
private final java.lang.Class[] interfacesImplementedByDynamicProxy
-
testResultClass
private final java.lang.Class<?> testResultClass
-
addListenerMethod
private final java.lang.reflect.Method addListenerMethod
-
testInterfaceRunMethod
private final java.lang.reflect.Method testInterfaceRunMethod
-
testInterface
private final java.lang.Class<?> testInterface
-
testCase
private final java.lang.Class<?> testCase
-
testsSuiteConstructor
private final java.lang.reflect.Constructor testsSuiteConstructor
-
-
Method Detail
-
tryGetMethod
private static java.lang.reflect.Method tryGetMethod(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Class<?>... parameters)
-
getMethod
private static java.lang.reflect.Method getMethod(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Class<?>... parameters)
-
constructTestObject
public java.lang.Object constructTestObject(java.lang.Class testClass) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.lang.InstantiationException
- Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.InstantiationException
-
createInstanceFromSuiteMethod
private static java.lang.Object createInstanceFromSuiteMethod(java.lang.Class<?> testClass) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
- Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
-
getTestConstructor
private static java.lang.reflect.Constructor getTestConstructor(java.lang.Class<?> testClass) throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
-
getInterfacesImplementedByDynamicProxy
public java.lang.Class[] getInterfacesImplementedByDynamicProxy()
-
getTestResultClass
public java.lang.Class<?> getTestResultClass()
-
getAddListenerMethod
public java.lang.reflect.Method getAddListenerMethod()
-
getTestInterfaceRunMethod
public java.lang.reflect.Method getTestInterfaceRunMethod()
-
getTestInterface
public java.lang.Class<?> getTestInterface()
-
getRunMethod
public java.lang.reflect.Method getRunMethod(java.lang.Class<?> testClass)
-
isJUnit3Available
public boolean isJUnit3Available()
-
-