public static void invokeMethod(Object target, Method method, Object... arguments) {
    """
	Invoke the given method on the given target using the given arguments.
	Allows to call private and protected methods.
	@throws RuntimeException if method could not be invoked.
	@param target
	@param method
	@param arguments
    """
        method.setAccessible(true); // so we can call private and protected methods too

        try {
            method.invoke(target, arguments);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
public static void invokeMethod(Object target, Method method, Object... arguments) {
        method.setAccessible(true); // so we can call private and protected methods too

        try {
            method.invoke(target, arguments);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
public static void invokeMethod ( Object target , Method method , Object ... arguments ) { method . setAccessible ( true ) ; // so we can call private and protected methods too try { method . invoke ( target , arguments ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
Invoke the given method on the given target using the given arguments.
Allows to call private and protected methods.
@throws RuntimeException if method could not be invoked.
@param target
@param method
@param arguments
Invoke the given method on the given target using the given arguments . Allows to call private and protected methods .