Class JUnit3Reflector
- java.lang.Object
-
- org.apache.maven.surefire.common.junit3.JUnit3Reflector
-
public final class JUnit3Reflector extends java.lang.ObjectReflection facade for JUnit3 classes
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringADD_LISTENER_METHODprivate java.lang.reflect.MethodaddListenerMethodprivate static java.lang.Class[]EMPTY_CLASS_ARRAYprivate static java.lang.Object[]EMPTY_OBJECT_ARRAYprivate java.lang.Class[]interfacesImplementedByDynamicProxyprivate static java.lang.StringRUN_METHODprivate static java.lang.StringTESTprivate static java.lang.StringTEST_CASEprivate static java.lang.StringTEST_LISTENERprivate static java.lang.StringTEST_RESULTprivate static java.lang.StringTEST_SUITEprivate java.lang.Class<?>testCaseprivate java.lang.Class<?>testInterfaceprivate java.lang.reflect.MethodtestInterfaceRunMethodprivate java.lang.Class<?>testResultClassprivate java.lang.reflect.ConstructortestsSuiteConstructor
-
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.ObjectconstructTestObject(java.lang.Class testClass)private static java.lang.ObjectcreateInstanceFromSuiteMethod(java.lang.Class<?> testClass)java.lang.reflect.MethodgetAddListenerMethod()java.lang.Class[]getInterfacesImplementedByDynamicProxy()private static java.lang.reflect.MethodgetMethod(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Class<?>... parameters)java.lang.reflect.MethodgetRunMethod(java.lang.Class<?> testClass)private static java.lang.reflect.ConstructorgetTestConstructor(java.lang.Class<?> testClass)java.lang.Class<?>getTestInterface()java.lang.reflect.MethodgetTestInterfaceRunMethod()java.lang.Class<?>getTestResultClass()booleanisJUnit3Available()private static java.lang.reflect.MethodtryGetMethod(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.IllegalAccessExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.NoSuchMethodExceptionjava.lang.InstantiationException
-
createInstanceFromSuiteMethod
private static java.lang.Object createInstanceFromSuiteMethod(java.lang.Class<?> testClass) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException- Throws:
java.lang.IllegalAccessExceptionjava.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()
-
-