public class MethodInvocationHelper
extends java.lang.Object
| Constructor and Description |
|---|
MethodInvocationHelper() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
invokeConfigurable(java.lang.Object instance,
java.lang.Object[] parameters,
IConfigurable configurableInstance,
java.lang.reflect.Method thisMethod,
ITestResult testResult) |
protected static java.util.Iterator<java.lang.Object[]> |
invokeDataProvider(java.lang.Object instance,
java.lang.reflect.Method dataProvider,
ITestNGMethod method,
ITestContext testContext,
java.lang.Object fedInstance,
IAnnotationFinder annotationFinder) |
protected static void |
invokeHookable(java.lang.Object testInstance,
java.lang.Object[] parameters,
IHookable hookable,
java.lang.reflect.Method thisMethod,
ITestResult testResult)
Invokes the
run method of the IHookable. |
protected static java.lang.Object |
invokeMethod(java.lang.reflect.Method thisMethod,
java.lang.Object instance,
java.util.List<java.lang.Object> parameters) |
protected static java.lang.Object |
invokeMethod(java.lang.reflect.Method thisMethod,
java.lang.Object instance,
java.lang.Object[] parameters) |
protected static void |
invokeMethodConsideringTimeout(ITestNGMethod tm,
ConstructorOrMethod method,
java.lang.Object targetInstance,
java.lang.Object[] params,
ITestResult testResult) |
protected static java.lang.Object |
invokeMethodNoCheckedException(java.lang.reflect.Method thisMethod,
java.lang.Object instance,
java.util.List<java.lang.Object> parameters) |
protected static void |
invokeWithTimeout(ITestNGMethod tm,
java.lang.Object instance,
java.lang.Object[] parameterValues,
ITestResult testResult)
Invokes a method on a separate thread in order to allow us to timeout the
invocation.
|
protected static void |
invokeWithTimeout(ITestNGMethod tm,
java.lang.Object instance,
java.lang.Object[] parameterValues,
ITestResult testResult,
IHookable hookable) |
protected static java.lang.Object invokeMethodNoCheckedException(java.lang.reflect.Method thisMethod,
java.lang.Object instance,
java.util.List<java.lang.Object> parameters)
protected static void invokeMethodConsideringTimeout(ITestNGMethod tm, ConstructorOrMethod method, java.lang.Object targetInstance, java.lang.Object[] params, ITestResult testResult) throws java.lang.Throwable
java.lang.Throwableprotected static java.lang.Object invokeMethod(java.lang.reflect.Method thisMethod,
java.lang.Object instance,
java.util.List<java.lang.Object> parameters)
throws java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetExceptionjava.lang.IllegalAccessExceptionprotected static java.lang.Object invokeMethod(java.lang.reflect.Method thisMethod,
java.lang.Object instance,
java.lang.Object[] parameters)
throws java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetExceptionjava.lang.IllegalAccessExceptionprotected static java.util.Iterator<java.lang.Object[]> invokeDataProvider(java.lang.Object instance,
java.lang.reflect.Method dataProvider,
ITestNGMethod method,
ITestContext testContext,
java.lang.Object fedInstance,
IAnnotationFinder annotationFinder)
protected static void invokeHookable(java.lang.Object testInstance,
java.lang.Object[] parameters,
IHookable hookable,
java.lang.reflect.Method thisMethod,
ITestResult testResult)
throws java.lang.Throwable
run method of the IHookable.testInstance - the instance to invoke the method inparameters - the parameters to be passed to IHookCallBackthisMethod - the method to be invoked through the IHookCallBacktestResult - the current ITestResult passed to
IHookable.runjava.lang.NoSuchMethodExceptionjava.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.Throwable - thrown if the reflective call to
thisMethod results in an exceptionprotected static void invokeWithTimeout(ITestNGMethod tm, java.lang.Object instance, java.lang.Object[] parameterValues, ITestResult testResult) throws java.lang.InterruptedException, ThreadExecutionException
Executor and a
CountDownLatch.java.lang.InterruptedExceptionThreadExecutionExceptionprotected static void invokeWithTimeout(ITestNGMethod tm, java.lang.Object instance, java.lang.Object[] parameterValues, ITestResult testResult, IHookable hookable) throws java.lang.InterruptedException, ThreadExecutionException
java.lang.InterruptedExceptionThreadExecutionExceptionprotected static void invokeConfigurable(java.lang.Object instance,
java.lang.Object[] parameters,
IConfigurable configurableInstance,
java.lang.reflect.Method thisMethod,
ITestResult testResult)
throws java.lang.Throwable
java.lang.Throwable