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 Type
    Method
    Description
    default @Nullable String
    Return the implicit prefix that is applied when performing a lookup or null if no prefix is used.
    default boolean
    Return true if this lookup is immutable and has contents that will never change.
  • Method Details

    • isImmutable

      default boolean isImmutable()
      Return true if this lookup is immutable and has contents that will never change.
      Returns:
      if the lookup is immutable
    • getPrefix

      default @Nullable String getPrefix()
      Return the implicit prefix that is applied when performing a lookup or null 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.