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
    protected MethodInvoker​(java.lang.Object target)  
  • Method Summary

    Modifier and Type Method Description
    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
  • Constructor Details

    • MethodInvoker

      protected MethodInvoker​(java.lang.Object target)
  • Method Details

    • 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