code: public synchronized void addCompilerPlugin(ScriptCompilerPluginSpec pluginSpec) throws ModuleLoadException  {
          Objects.requireNonNull(pluginSpec, "pluginSpec");
          ModuleIdentifier pluginModuleId = JBossModuleUtils.getPluginModuleId(pluginSpec);
          ModuleSpec.Builder moduleSpecBuilder = ModuleSpec.build(pluginModuleId);
          Map<ModuleId, ModuleIdentifier> latestRevisionIds = jbossModuleLoader.getLatestRevisionIds();
          JBossModuleUtils.populateCompilerModuleSpec(moduleSpecBuilder, pluginSpec, latestRevisionIds);
          // Add app package dependencies, while blocking them from leaking (being exported) to downstream modules
          // TODO: We expose the full set of app packages to the compiler too.
          // Maybe more control over what is exposed is needed here.
          JBossModuleUtils.populateModuleSpecWithAppImports(moduleSpecBuilder, appClassLoader, appPackagePaths);
          ModuleSpec moduleSpec = moduleSpecBuilder.create();
  
          // spin up the module, and get the compiled classes from it's classloader
          String providerClassName = pluginSpec.getPluginClassName();
          if (providerClassName != null) {
              jbossModuleLoader.addModuleSpec(moduleSpec);
              Module pluginModule = jbossModuleLoader.loadModule(pluginModuleId);
              ModuleClassLoader pluginClassLoader = pluginModule.getClassLoader();
              Class<?> compilerProviderClass;
              try {
                  compilerProviderClass = pluginClassLoader.loadClass(providerClassName);
                  ScriptCompilerPlugin pluginBootstrap = (ScriptCompilerPlugin) compilerProviderClass.newInstance();
                  Set<? extends ScriptArchiveCompiler> pluginCompilers = pluginBootstrap.getCompilers(pluginSpec.getCompilerParams());
                  compilers.addAll(pluginCompilers);
              } catch (Exception e) {
                  throw new ModuleLoadException(e);
              }
  
              // Save classloader away, in case clients would like access to compiler plugin's classes.
              compilerClassLoaders.put(pluginSpec.getPluginId(), pluginModule.getClassLoader());
          }
      }
docs: Add a language plugin to this module
  @param pluginSpec
  @throws ModuleLoadException