code: public static <T> T callConstructor(Class<T> c, Class<?>[] argTypes, Object[] args) {
          try {
              Constructor<T> cons = c.getConstructor(argTypes);
              return cons.newInstance(args);
          } catch(InvocationTargetException e) {
              throw getCause(e);
          } catch(IllegalAccessException e) {
              throw new IllegalStateException(e);
          } catch(NoSuchMethodException e) {
              throw new IllegalArgumentException(e);
          } catch(InstantiationException e) {
              throw new IllegalArgumentException(e);
          }
      }
docs: Call the class constructor with the given arguments
  
  @param c The class
  @param args The arguments
  @return The constructed object