Interface PropertySourceInfo
- All Known Implementing Classes:
ConfigTreePropertySource
,OriginTrackedMapPropertySource
,SystemEnvironmentPropertySourceEnvironmentPostProcessor.OriginAwareSystemEnvironmentPropertySource
public interface PropertySourceInfo
Interface that can be optionally implemented by a
PropertySource
to provide
additional information.- Since:
- 4.0.0
- Author:
- Phillip Webb
-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable String
Return the implicit prefix that is applied when performing a lookup ornull
if no prefix is used.default boolean
Returntrue
if this lookup is immutable and has contents that will never change.
-
Method Details
-
isImmutable
default boolean isImmutable()Returntrue
if this lookup is immutable and has contents that will never change.- Returns:
- if the lookup is immutable
-
getPrefix
Return the implicit prefix that is applied when performing a lookup ornull
if no prefix is used. Prefixes can be used to disambiguate keys that would otherwise clash. For example, if multiple applications are running on the same machine a different prefix can be set on each application to ensure that different environment variables are used.- Returns:
- the prefix applied by the lookup class or
null
.
-