DefaultConfigLoader

class DefaultConfigLoader<T : Any>(clazz: Class<T>, parser: ConfigParser, schema: YaclaSchema<T>?, file: Path, logger: YaclaLogger?, resourcePath: String) : ConfigLoader<T>

Constructors

Link copied to clipboard
constructor(clazz: Class<T>, parser: ConfigParser, schema: YaclaSchema<T>?, file: Path, logger: YaclaLogger?, resourcePath: String)

Properties

Link copied to clipboard
open override var config: T

The loaded configuration object.

Functions

Link copied to clipboard
open override fun reload(): ConfigLoader<T>

Reloads the configuration object from the backing file.

Link copied to clipboard
open override fun updateConfig(): Boolean

Attempts to update the configuration file by merging the default resource with the current file, preserving user-defined values.

Link copied to clipboard
open override fun validate(): ConfigLoader<T>

Validates the configuration object based on field annotations such as net.ririfa.yacla.annotation.Required and net.ririfa.yacla.annotation.Range.