code: public static <T> T newInstance(Class clazz, Object... args) {
  
          if (clazz == null) return null;
  
          Class[] argsClass = getArgsClasses(args);
  
          try {
              Constructor<T> constructor = clazz.<T>getConstructor(argsClass);
              return constructor.newInstance(args);
          } catch (InstantiationException | InvocationTargetException | NoSuchMethodException | IllegalAccessException e) {
              throw new IllegalStateException(e.getMessage(), e);
          }
      }
docs: <p>newInstance.</p>
  
  @param clazz a {@link java.lang.Class} object.
  @param args a {@link java.lang.Object} object.
  @param <T> a T object.
  @return a T object.