code: public static <T> T loadAndInstantiateClass(
              AddOnClassLoader addOnClassLoader,
              String classname,
              Class<T> clazz,
              String type) {
          validateNotNull(addOnClassLoader, "addOnClassLoader");
          validateNotNull(classname, "classname");
          validateNotNull(clazz, "clazz");
          validateNotNull(type, "type");
  
          return loadAndInstantiateClassImpl(addOnClassLoader, classname, clazz, type);
      }
docs: Loads, using the given {@code addOnClassLoader}, and creates an instance with the given {@code classname} of the
  (expected) given {@code clazz}. The {@code type} is used in error log messages, to indicate the expected type being
  loaded.
  
  @param <T> the type of the class that will be instantiated
  @param addOnClassLoader the class loader of the add-on that contains the classes
  @param classname the binary name of the class that will be loaded
  @param clazz the type of the instance that will be created using the class loaded
  @param type the expected type being loaded (for example, "extension", "ascanrule"...)
  @return an instance of the given {@code clazz}, or {@code null} if an error occurred (for example, not being of the
  expected type)
  @throws IllegalArgumentException if any of the parameters is {@code null}.