Module io.inverno.mod.configuration
Package io.inverno.mod.configuration
Class AbstractConfigurationLoader<A,B extends AbstractConfigurationLoader<A,B>>
java.lang.Object
io.inverno.mod.configuration.AbstractConfigurationLoader<A,B>
- Type Parameters:
A
- the configuration type to loadB
- the configuration loader type
- All Implemented Interfaces:
ConfigurationLoader<A,
B>
- Direct Known Subclasses:
ConfigurationLoaderSupport
public abstract class AbstractConfigurationLoader<A,B extends AbstractConfigurationLoader<A,B>>
extends Object
implements ConfigurationLoader<A,B>
Base implementation for ConfigurationLoader
.
- Author:
- Jeremy Kuhn
-
Field Summary
Modifier and TypeFieldDescriptionprotected List
<ConfigurationKey.Parameter> The parameters to use to retrieve configuration values.protected ConfigurationSource
<?, ?, ?> The configuration source to use to load the configuration. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionwithParameters
(List<ConfigurationKey.Parameter> parameters) Defines parameters that specify the context in which configuration properties are to be retrieved.withSource
(ConfigurationSource<?, ?, ?> source) Specifies the configuration source from where to load configuration properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.inverno.mod.configuration.ConfigurationLoader
load, withParameters, withParameters, withParameters, withParameters, withParameters, withParameters, withParameters, withParameters, withParameters, withParameters, withParameters
-
Field Details
-
source
The configuration source to use to load the configuration. -
parameters
The parameters to use to retrieve configuration values.
-
-
Constructor Details
-
AbstractConfigurationLoader
public AbstractConfigurationLoader()
-
-
Method Details
-
withParameters
public B withParameters(List<ConfigurationKey.Parameter> parameters) throws IllegalArgumentException Description copied from interface:ConfigurationLoader
Defines parameters that specify the context in which configuration properties are to be retrieved.
- Specified by:
withParameters
in interfaceConfigurationLoader<A,
B extends AbstractConfigurationLoader<A, B>> - Parameters:
parameters
- a list of parameters- Returns:
- the configuration loader
- Throws:
IllegalArgumentException
- if parameters were specified more than once
-
withSource
Description copied from interface:ConfigurationLoader
Specifies the configuration source from where to load configuration properties.
- Specified by:
withSource
in interfaceConfigurationLoader<A,
B extends AbstractConfigurationLoader<A, B>> - Parameters:
source
- a configuration source- Returns:
- the configuration loader
-