code: public <T> T createInstance(Class<T> type) {
          try {
              return type.newInstance();
          } catch (InstantiationException | IllegalAccessException e) {
              throw new IllegalArgumentException("Cannot create instance of class " + type.getName(), e);
          }
      }
docs: Create an instance of the given class.
  
  @param type The type.
  @param <T>  The type.
  @return The scanner plugin instance.