code: public static <T> T invokeUnchecked(Method method, Object target, Object... arguments)
      {
          try
          {
              @SuppressWarnings("unchecked")
              T result = (T) method.invoke(target, arguments);
              return result;
          }
          catch (IllegalAccessException ex)
          {
              // This cannot happen if the method is public.
              throw new IllegalArgumentException("Method " + method.getName() + " is not publicly accessible.", ex);
          }
          catch (InvocationTargetException ex)
          {
              // If the method is not declared to throw any checked exceptions,
              // the worst that can happen is a RuntimeException or an Error (we can,
              // and should, re-throw both).
              if (ex.getCause() instanceof Error)
              {
                  throw (Error) ex.getCause();
              }
              else
              {
                  throw (RuntimeException) ex.getCause();
              }
          }
      }
docs: Invokes the specified method without throwing any checked exceptions.
  This is only valid for methods that are not declared to throw any checked
  exceptions.  Any unchecked exceptions thrown by the specified method will be
  re-thrown (in their original form, not wrapped in an InvocationTargetException
  as would be the case for a normal reflective invocation).
  @param method The method to invoke.  Both the method and its class must have
  been declared public and non-abstract, otherwise they will be inaccessible.
  @param target The object on which to invoke the method.
  @param arguments The method arguments.
  @param <T> The return type of the method.  The compiler can usually infer the
  correct type.
  @return The result of invoking the method, or null if the method is void.