Class SinglePropertyResolver
- java.lang.Object
-
- org.kiwiproject.config.provider.util.SinglePropertyResolver
-
public class SinglePropertyResolver extends Object
-
-
Constructor Summary
Constructors Constructor Description SinglePropertyResolver()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> ResolverResult<T>
resolveProperty(PropertyResolutionSettings<T> settings)
Resolves a configuration property in the following order: System property with the given system property key System property with the default system property key Environment variable with the given variable name Environment variable with the default variable name The value from an external configuration file with the given key The value from an external configuration file with the default key The value from a given supplier The value explicitly givenstatic ResolverResult<String>
resolveStringProperty(PropertyResolutionSettings<String> settings)
-
-
-
Method Detail
-
resolveStringProperty
public static ResolverResult<String> resolveStringProperty(PropertyResolutionSettings<String> settings)
-
resolveProperty
public static <T> ResolverResult<T> resolveProperty(PropertyResolutionSettings<T> settings)
Resolves a configuration property in the following order:- System property with the given system property key
- System property with the default system property key
- Environment variable with the given variable name
- Environment variable with the default variable name
- The value from an external configuration file with the given key
- The value from an external configuration file with the default key
- The value from a given supplier
- The value explicitly given
- Type Parameters:
T
- The type of the value to be returned- Parameters:
settings
- A set of settings to figure out the resolution process- Returns:
- The resolved value
-
-