private void addCustomModule(String moduleClassName, SchemaGeneratorConfigBuilder configBuilder) throws MojoExecutionException {
        this.getLog().debug("- Adding custom Module " + moduleClassName);
        try {
            Class<? extends Module> moduleClass = (Class<? extends Module>) this.loadClass(moduleClassName);
            Module moduleInstance = moduleClass.getConstructor().newInstance();
            configBuilder.with(moduleInstance);
        } catch (ClassCastException | InstantiationException
                 | IllegalAccessException | NoSuchMethodException
                 | InvocationTargetException e) {
            throw new MojoExecutionException("Error: Can not instantiate custom module " + moduleClassName, e);
        }
    }
Instantiate and apply the custom module with the given class name to the config builder.

@param moduleClassName Class name of the custom module to add.
@param configBuilder The builder on which the module is added.
@throws MojoExecutionException When failing to instantiate the indicated module class.
jsonschema-maven-plugin/src/main/java/com/github/victools/jsonschema/plugin/maven/SchemaGeneratorMojo.java