code: public static <T> T newInstance(Constructor<T> constructor, Object... args) throws IllegalAccessException, InvocationTargetException, InstantiationException {
          if (constructor.isVarArgs()) {
              args = fixVarArgs(constructor.getParameterTypes(), args);
          }
          return constructor.newInstance(args);
      }
docs: Invokes {@code constructor}, automatically tries to fix varargs arguments.
  @param <T>
  @param constructor
  @param args
  @return new instance
  @throws IllegalAccessException
  @throws InvocationTargetException
  @throws InstantiationException