code: public static <T> T newInstance(final Class<T> klazz) {
      try {
        return klazz.getConstructor().newInstance();
      } catch (Exception ex) {
        throw new Error(String.format("Can't create instance of %s for error %s", klazz.getCanonicalName(), ex.getMessage()), ex);
      }
    }
docs: Create class instance through default constructor call
  
  @param klazz class to be instantiated, must not be null
  @param <T>   type of the class
  @return instance of class, must not be null