ConfigLoaderBuilder

Builder interface for configuring and creating a ConfigLoader instance.

Provides a fluent API for specifying where to load the configuration from, which parser to use, and logging and auto-update behaviors.

Inheritors

Functions

Link copied to clipboard

Enables or disables automatic config updates based on resource version.

Link copied to clipboard

Sets the fallback language used when the selected localized resource does not exist.

Link copied to clipboard

Specifies the path to the resource file (or directory root for locale resolution) bundled with the application. Used as a fallback or for initial creation.

Link copied to clipboard
open fun language(language: String): ConfigLoaderBuilder<T>

Sets the language used when resolving localized resources.

Link copied to clipboard

Selects whether localized resources are copied to a single file or one file per language.

Link copied to clipboard
abstract fun load(): ConfigLoader<T>

Builds and loads the config, returning a ConfigLoader instance.

Link copied to clipboard
open fun outputLanguages(vararg languages: String): ConfigLoaderBuilder<T>

Sets the languages copied when languageOutputMode is LanguageOutputMode.MULTIPLE_FILES.

Link copied to clipboard
abstract fun parser(parser: ConfigParser): ConfigLoaderBuilder<T>

Sets the parser used to read and write the config file.

Link copied to clipboard
open fun pull(file: Path): ConfigLoaderBuilder<T>

Resolves a localized resource using the configured language.

abstract fun pull(locale: String, file: Path): ConfigLoaderBuilder<T>

Resolves a locale-specific resource and sets the output path.

Link copied to clipboard

Uses the current JVM locale when resolving localized resources.

Link copied to clipboard
abstract fun toFile(file: Path): ConfigLoaderBuilder<T>

Sets the file where the configuration will be loaded from or saved to.

Link copied to clipboard

Sets the logger used for informational and error messages.