Interface ConfigurationProperty<T>

    • Method Detail

      • get

        T get​(ConfigurationPropertySource source)
        Get the value of this configuration property.
        Parameters:
        source - A configuration source.
        Returns:
        The value of this property according to the given source.
      • getAndTransform

        <R> R getAndTransform​(ConfigurationPropertySource source,
                              Function<T,​R> transform)
        Get and transform the value of this configuration property.

        Any exception occurring during transformation will be wrapped in another exception adding some context, such as the resolved key for this property.

        Type Parameters:
        R - The transformed type.
        Parameters:
        source - A configuration source.
        transform - A transform function to be applied to the value of this configuration property before returning the result.
        Returns:
        The value of this property according to the given source.
      • resolveOrRaw

        String resolveOrRaw​(ConfigurationPropertySource source)
        Resolve the key for this configuration property as registered in the underlying configuration source, or, if not possible, just return the "raw" key passed to forKey(String).

        Useful for debugging.

        Parameters:
        source - A configuration source.
        Returns:
        The value of this property according to the given source.
        See Also:
        resolve(ConfigurationPropertySource)
      • forKey

        static KeyContext forKey​(String key)
        Start the creation of a configuration property.
        Parameters:
        key - The key for that configuration property.
        Returns:
        A context allowing to further define the configuration property.