Class ModularApplicationBuilder<T extends ModularApplicationBuilder<T>>

Direct Known Subclasses:
IsolatedApplicationBuilder

public abstract class ModularApplicationBuilder<T extends ModularApplicationBuilder<T>> extends InjectingApplicationBuilder<T>
  • Constructor Details

    • ModularApplicationBuilder

      @Contract(pure=true) public ModularApplicationBuilder(@NotNull @NotNull String applicationName, @NotNull @NotNull Function<T,Injectable> injectableSupplier)
  • Method Details

    • create

      @Contract(value="_ -> new", pure=true) @NotNull public static @NotNull ModularApplicationBuilder<?> create(@NotNull @NotNull String applicationName)
    • create

      @Contract(value="_, _ -> new", pure=true) @NotNull public static @NotNull ModularApplicationBuilder<?> create(@NotNull @NotNull String applicationName, @NotNull @NotNull ClassLoader classLoader)
    • create

      @Contract(value="_, _ -> new", pure=true) @NotNull public static @NotNull ModularApplicationBuilder<?> create(@NotNull @NotNull String applicationName, @NotNull @NotNull Injectable injectable)
    • moduleDataProviderFactory

      @Contract(value="_ -> this", mutates="this") @NotNull public final T moduleDataProviderFactory(@NotNull @NotNull DependencyDataProviderFactory moduleDataProviderFactory)
      Factory that produces DataProvider for modules in jar-in-jar classloading. Ignored if not using jar-in-jar/isolated(...) Used to fetch the `slimjar.dat` file of each submodule.
      Parameters:
      moduleDataProviderFactory - Factory that produces DataProvider for modules in jar-in-jar
      Returns:
      this
    • modulePreResolutionDataProviderFactory

      @Contract(value="_ -> this", mutates="this") @NotNull public final T modulePreResolutionDataProviderFactory(@NotNull @NotNull PreResolutionDataProviderFactory modulePreResolutionDataProviderFactory)
      Factory that produces PreResolutionDataProvider for modules in jar-in-jar classloading. Ignored if not using jar-in-jar/isolated(...) Used to fetch the `slimjar.dat` file of each submodule.
      Parameters:
      modulePreResolutionDataProviderFactory - Factory that produces DataProvider for modules in jar-in-jar
      Returns:
      this
    • modules

      @Contract(value="_ -> this", mutates="this") @NotNull public T modules(@NotNull @NotNull String... modules)
      Adds one or more modules to the modular application builder. This method updates the internal list of modules that will be included in the application.
      Parameters:
      modules - The names of the modules to be added. Must not be null.
      Returns:
      The builder instance for method chaining.
    • moduleExtractor

      @Contract(value="_ -> this", mutates="this") @NotNull public T moduleExtractor(@NotNull @NotNull ModuleExtractor moduleExtractor)
      Sets the specified ModuleExtractor for the modular application builder. The ModuleExtractor is used to handle the extraction of modules during the application setup process.
      Parameters:
      moduleExtractor - The ModuleExtractor instance to be used by the builder. Must not be null.
      Returns:
      The builder instance for method chaining.
    • getModules

      @Contract(mutates="this") @NotNull protected final @NotNull Collection<String> getModules()
    • getModuleDataProviderFactory

      @Contract(mutates="this") @NotNull protected final @NotNull DependencyDataProviderFactory getModuleDataProviderFactory()
    • getModulePreResolutionDataProviderFactory

      @Contract(mutates="this") @NotNull protected final @NotNull PreResolutionDataProviderFactory getModulePreResolutionDataProviderFactory()
    • buildApplication

      @NotNull protected final @NotNull Application buildApplication() throws SlimJarException
      Overrides:
      buildApplication in class InjectingApplicationBuilder<T extends ModularApplicationBuilder<T>>
      Throws:
      SlimJarException
    • buildApplication

      protected Application buildApplication(@NotNull @NotNull Injectable injectable) throws SlimJarException
      Throws:
      SlimJarException