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 |
protected |
MethodInvoker(java.lang.Object target)
|
|
Method Summary |
protected java.lang.Object |
invokeMethod(java.lang.reflect.Method method,
java.lang.Object[] parameters)
|
static MethodInvoker |
on(java.lang.Object target)
|
java.lang.Object |
run(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 |
MethodInvoker
protected MethodInvoker(java.lang.Object target)
on
public static MethodInvoker on(java.lang.Object target)
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.IllegalAccessException
java.lang.reflect.InvocationTargetException
Copyright © 2011-2012 Wakaleo Consulting. All Rights Reserved.