code: public static <T> T invokeUnchecked(Constructor<T> constructor, Object... arguments)
      {
          try
          {
              return constructor.newInstance(arguments);
          }
          catch (IllegalAccessException ex)
          {
              // This cannot happen if the constructor is public.
              throw new IllegalArgumentException("Constructor is not publicly accessible.", ex);
          }
          catch (InstantiationException ex)
          {
              // This can only happen if the constructor belongs to an
              // abstract class.
              throw new IllegalArgumentException("Constructor is part of an abstract class.", 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 constructor without throwing any checked exceptions.
  This is only valid for constructors that are not declared to throw any checked
  exceptions.  Any unchecked exceptions thrown by the specified constructor will be
  re-thrown (in their original form, not wrapped in an InvocationTargetException
  as would be the case for a normal reflective invocation).
  @param constructor The constructor to invoke.  Both the constructor and its
  class must have been declared public, and the class must not be abstract,
  otherwise they will be inaccessible.
  @param arguments The method arguments.
  @param <T> The return type of the method.  The compiler can usually infer the
  correct type.
  @return The object created by invoking the specified constructor with the specified
  arguments.