Package net.thucydides.junit.internals
Class MethodInvoker
java.lang.Object
net.thucydides.junit.internals.MethodInvoker
public class MethodInvoker
extends java.lang.Object
A centralized way to invoke a method on a parameter.
Raises an IllegalArgumentException if something goes wrong.
-
Constructor Summary
Constructors Modifier Constructor Description protectedMethodInvoker(java.lang.Object target) -
Method Summary
Modifier and Type Method Description protected java.lang.ObjectinvokeMethod(java.lang.reflect.Method method, java.lang.Object[] parameters)static MethodInvokeron(java.lang.Object target)java.lang.Objectrun(java.lang.reflect.Method method, java.lang.Object... parameters)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
MethodInvoker
protected MethodInvoker(java.lang.Object target)
-
-
Method Details
-
on
-
run
public java.lang.Object run(java.lang.reflect.Method method, java.lang.Object... parameters) -
invokeMethod
protected java.lang.Object invokeMethod(java.lang.reflect.Method method, java.lang.Object[] parameters) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException- Throws:
java.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetException
-