Object invokeMethod(String name, Class<?>[] parameterTypes, Object instance, Object[] parameters)
            throws InvocationException {
        try {
            return findMethod(name, parameterTypes).invoke(instance, parameters);
        } catch (IllegalAccessException e) {
            throw new InvocationException(e, "Unable to invoke {0}({1}) on object {2} with parameters {3}", name,
                    parameterTypes, instance == null ? "" : instance.getClass().getName(), parameters);
        } catch (IllegalArgumentException e) {
            throw new InvocationException(e, "Unable to invoke {0}({1}) on object {2} with parameters {3}", name,
                    parameterTypes, instance == null ? "" : instance.getClass().getName(), parameters);
        } catch (InvocationTargetException e) {
            throw new InvocationException(e, "Unable to invoke {0}({1}) on object {2} with parameters {3}", name,
                    parameterTypes, instance == null ? "" : instance.getClass().getName(), parameters);
        } catch (SecurityException e) {
            throw new InvocationException(e, "Unable to invoke {0}({1}) on object {2} with parameters {3}", name,
                    parameterTypes, instance == null ? "" : instance.getClass().getName(), parameters);
        } catch (InvocationException e) {
            throw new InvocationException(e, "Unable to invoke {0}({1}) on object {2} with parameters {3}", name,
                    parameterTypes, instance == null ? "" : instance.getClass().getName(), parameters);
        }
    }
Object invokeMethod ( String name , Class < ? > [ ] parameterTypes , Object instance , Object [ ] parameters ) throws InvocationException { try { return findMethod ( name , parameterTypes ) . invoke ( instance , parameters ) ; } catch ( IllegalAccessException e ) { throw new InvocationException ( e , "Unable to invoke {0}({1}) on object {2} with parameters {3}" , name , parameterTypes , instance == null ? "" : instance . getClass ( ) . getName ( ) , parameters ) ; } catch ( IllegalArgumentException e ) { throw new InvocationException ( e , "Unable to invoke {0}({1}) on object {2} with parameters {3}" , name , parameterTypes , instance == null ? "" : instance . getClass ( ) . getName ( ) , parameters ) ; } catch ( InvocationTargetException e ) { throw new InvocationException ( e , "Unable to invoke {0}({1}) on object {2} with parameters {3}" , name , parameterTypes , instance == null ? "" : instance . getClass ( ) . getName ( ) , parameters ) ; } catch ( SecurityException e ) { throw new InvocationException ( e , "Unable to invoke {0}({1}) on object {2} with parameters {3}" , name , parameterTypes , instance == null ? "" : instance . getClass ( ) . getName ( ) , parameters ) ; } catch ( InvocationException e ) { throw new InvocationException ( e , "Unable to invoke {0}({1}) on object {2} with parameters {3}" , name , parameterTypes , instance == null ? "" : instance . getClass ( ) . getName ( ) , parameters ) ; } }
Invokes method on class registered within {@link Invokable}. It looks also for superclasses

@param name name of the method
@param parameterTypes parameter types of the method
@param instance instance on which method is called, {@code null} for static methods
@param parameters parameters for method invocation
@return
@throws InvocationException if method was not found or could not be invoked