code: public static Object invokeMethod(Method method, Object instance, Object... parameters) {
          if (method == null) {
              return null;
          }
          try {
              return method.invoke(instance, parameters);
          } catch (IllegalAccessException e) {
              throw new RuntimeException(e);
          } catch (InvocationTargetException e) {
              throw new RuntimeException(e.getCause());
          }
      }
docs: A helper method to invoke a method via reflection and wrap any exceptions
  as {@link RuntimeException} instances
  
  @param method     the method to invoke
  @param instance   the object instance (or null for static methods)
  @param parameters the parameters to the method
  @return the result of the method invocation