Package io.github.slimjar.app.builder
Class InjectingApplicationBuilder<T extends InjectingApplicationBuilder<T>>
java.lang.Object
io.github.slimjar.app.builder.ApplicationBuilder<T>
io.github.slimjar.app.builder.InjectingApplicationBuilder<T>
- Direct Known Subclasses:
ModularApplicationBuilder
public abstract class InjectingApplicationBuilder<T extends InjectingApplicationBuilder<T>>
extends ApplicationBuilder<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable InjectableFactoryprotected final @NotNull Function<T,Injectable> Fields inherited from class io.github.slimjar.app.builder.ApplicationBuilder
self -
Constructor Summary
ConstructorsConstructorDescriptionInjectingApplicationBuilder(@NotNull String applicationName, @NotNull Function<T, Injectable> injectableSupplier) -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull Applicationstatic @NotNull InjectingApplicationBuilder<?>static @NotNull InjectingApplicationBuilder<?>create(@NotNull String applicationName, @NotNull Injectable injectable) static @NotNull InjectingApplicationBuilder<?>create(@NotNull String applicationName, @NotNull ClassLoader classLoader) protected final @NotNull InjectableFactoryinjectableFactory(@NotNull InjectableFactory injectableFactory) Sets theInjectableFactoryfor the builder and returns the builder instance.Methods inherited from class io.github.slimjar.app.builder.ApplicationBuilder
appending, build, createInjector, dataProviderFactory, dependencyFileUrl, downloadDirectoryPath, downloaderFactory, enquirerFactory, getApplicationName, getDataProviderFactory, getDependencyFileUrl, getDownloadDirectoryPath, getDownloaderFactory, getEnquirerFactory, getInjectorFactory, getLogger, getMirrorSelector, getPreResolutionDataProviderFactory, getPreResolutionFileUrl, getRelocationHelperFactory, getRelocatorFactory, getResolverFactory, getVerifierFactory, injecting, injectorFactory, isolated, logger, mirrorSelector, preResolutionDataProviderFactory, preResolutionFileUrl, relocationHelperFactory, relocatorFactory, resolverFactory, verifierFactory
-
Field Details
-
injectableSupplier
@NotNull protected final @NotNull Function<T extends InjectingApplicationBuilder<T>,Injectable> injectableSupplier -
injectableFactory
-
-
Constructor Details
-
InjectingApplicationBuilder
@Contract(pure=true) public InjectingApplicationBuilder(@NotNull @NotNull String applicationName, @NotNull @NotNull Function<T, Injectable> injectableSupplier)
-
-
Method Details
-
buildApplication
@Contract(value="-> new", mutates="this") @NotNull protected @NotNull Application buildApplication()- Specified by:
buildApplicationin classApplicationBuilder<T extends InjectingApplicationBuilder<T>>
-
create
@Contract(value="_ -> new", pure=true) @NotNull public static @NotNull InjectingApplicationBuilder<?> create(@NotNull @NotNull String applicationName) -
create
@Contract(value="_, _ -> new", pure=true) @NotNull public static @NotNull InjectingApplicationBuilder<?> create(@NotNull @NotNull String applicationName, @NotNull @NotNull ClassLoader classLoader) -
create
@Contract(value="_, _ -> new", pure=true) @NotNull public static @NotNull InjectingApplicationBuilder<?> create(@NotNull @NotNull String applicationName, @NotNull @NotNull Injectable injectable) -
injectableFactory
@Contract(value="_ -> this", mutates="this") @NotNull public T injectableFactory(@NotNull @NotNull InjectableFactory injectableFactory) Sets theInjectableFactoryfor the builder and returns the builder instance.- Parameters:
injectableFactory- theInjectableFactoryto configure for this builder instance. It defines how injectables are created using a provided set of resources.- Returns:
- the current builder instance for chaining calls.
-
getInjectableFactory
@Contract(mutates="this") @NotNull protected final @NotNull InjectableFactory getInjectableFactory()
-