Module io.inverno.mod.configuration
Package io.inverno.mod.configuration
Interface DefaultableConfigurationSource<A extends ConfigurationQuery<A,B>,B extends ExecutableConfigurationQuery<A,B>,C extends ListConfigurationQuery<C>,D extends DefaultableConfigurationSource<A,B,C,D>>
- Type Parameters:
A
- source specific query typeB
- source specific executable query typeC
- source specific list query typeD
- defaulting strategy type
- All Superinterfaces:
ConfigurationSource<A,
B, C>
- All Known Implementing Classes:
AbstractHashConfigurationSource
,CommandLineConfigurationSource
,CPropsFileConfigurationSource
,MapConfigurationSource
,PropertiesConfigurationSource
,PropertyFileConfigurationSource
,RedisConfigurationSource
,VersionedRedisConfigurationSource
public interface DefaultableConfigurationSource<A extends ConfigurationQuery<A,B>,B extends ExecutableConfigurationQuery<A,B>,C extends ListConfigurationQuery<C>,D extends DefaultableConfigurationSource<A,B,C,D>>
extends ConfigurationSource<A,B,C>
A defaultable configuration source has the ability to search for default properties if no exact result exist for a given query.
Such source relies on DefaultingStrategy
to obtain the list of queries to execute from the original query (see
DefaultingStrategy.getDefaultingKeys(io.inverno.mod.configuration.ConfigurationKey)
).
- Since:
- 1.5
- Author:
- Jeremy Kuhn
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionunwrap()
Returns the original configuration source.withDefaultingStrategy
(DefaultingStrategy defaultingStrategy) Returns a proxy of the defaultable configuration source instance using the specified defaulting strategy.Methods inherited from interface io.inverno.mod.configuration.ConfigurationSource
get, list
-
Method Details
-
withDefaultingStrategy
Returns a proxy of the defaultable configuration source instance using the specified defaulting strategy.
- Parameters:
defaultingStrategy
- a defaulting strategy- Returns:
- a new defaultable configuration source
-
unwrap
D unwrap()Returns the original configuration source.
- Returns:
- a configuration source
-