@FunctionalInterface
public interface ConfigurationPropertySource
ConfigurationProperties.ConfigurationPropertyName,
OriginTrackedValue,
getConfigurationProperty(ConfigurationPropertyName)| Modifier and Type | Method and Description |
|---|---|
default ConfigurationPropertyState |
containsDescendantOf(ConfigurationPropertyName name)
Returns if the source contains any descendants of the specified name.
|
default ConfigurationPropertySource |
filter(java.util.function.Predicate<ConfigurationPropertyName> filter)
Return a filtered variant of this source, containing only names that match the
given
Predicate. |
static ConfigurationPropertySource |
from(org.springframework.core.env.PropertySource<?> source)
Return a single new
ConfigurationPropertySource adapted from the given
Spring PropertySource or null if the source cannot be adapted. |
ConfigurationProperty |
getConfigurationProperty(ConfigurationPropertyName name)
Return a single
ConfigurationProperty from the source or null if no
property can be found. |
default java.lang.Object |
getUnderlyingSource()
Return the underlying source that is actually providing the properties.
|
default ConfigurationPropertySource |
withAliases(ConfigurationPropertyNameAliases aliases)
Return a variant of this source that supports name aliases.
|
default ConfigurationPropertySource |
withPrefix(java.lang.String prefix)
Return a variant of this source that supports a prefix.
|
ConfigurationProperty getConfigurationProperty(ConfigurationPropertyName name)
ConfigurationProperty from the source or null if no
property can be found.name - the name of the property (must not be null)null.default ConfigurationPropertyState containsDescendantOf(ConfigurationPropertyName name)
ConfigurationPropertyState.PRESENT or
ConfigurationPropertyState.ABSENT if an answer can be determined or
ConfigurationPropertyState.UNKNOWN if it's not possible to determine a
definitive answer.name - the name to checkdefault ConfigurationPropertySource filter(java.util.function.Predicate<ConfigurationPropertyName> filter)
Predicate.filter - the filter to matchConfigurationPropertySource instancedefault ConfigurationPropertySource withAliases(ConfigurationPropertyNameAliases aliases)
aliases - a function that returns a stream of aliases for any given nameConfigurationPropertySource instance supporting name aliasesdefault ConfigurationPropertySource withPrefix(java.lang.String prefix)
prefix - the prefix for properties in the sourceConfigurationPropertySource instance supporting a prefixdefault java.lang.Object getUnderlyingSource()
null.static ConfigurationPropertySource from(org.springframework.core.env.PropertySource<?> source)
ConfigurationPropertySource adapted from the given
Spring PropertySource or null if the source cannot be adapted.source - the Spring property source to adaptnull SpringConfigurationPropertySource