Class ConfigValue

  • All Implemented Interfaces:
    org.eclipse.microprofile.config.ConfigValue

    @Experimental("Extension to the original ConfigSource to allow retrieval of additional metadata on config lookup")
    public class ConfigValue
    extends Object
    implements org.eclipse.microprofile.config.ConfigValue
    The ConfigValue is a metadata object that holds additional information after the lookup of a configuration.

    Right now, it is able to hold information like the configuration name, value, the Config Source from where the configuration was loaded, the ordinal of the Config Source and a line number from where the configuration was read if exists.

    This is used together with ConfigValueConfigSource and ConfigSourceInterceptor to expose the Configuration lookup metadata.

    • Method Detail

      • getName

        public String getName()
        Specified by:
        getName in interface org.eclipse.microprofile.config.ConfigValue
      • getNameProfiled

        public String getNameProfiled()
      • getValue

        public String getValue()
        Specified by:
        getValue in interface org.eclipse.microprofile.config.ConfigValue
      • getRawValue

        public String getRawValue()
        Specified by:
        getRawValue in interface org.eclipse.microprofile.config.ConfigValue
      • getProfile

        public String getProfile()
      • getSourceName

        public String getSourceName()
        Specified by:
        getSourceName in interface org.eclipse.microprofile.config.ConfigValue
      • getSourceOrdinal

        public int getSourceOrdinal()
        Specified by:
        getSourceOrdinal in interface org.eclipse.microprofile.config.ConfigValue
      • getConfigSourceName

        public String getConfigSourceName()
      • getConfigSourceOrdinal

        public int getConfigSourceOrdinal()
      • getConfigSourcePosition

        public int getConfigSourcePosition()
      • getLineNumber

        public int getLineNumber()
      • getLocation

        public String getLocation()
      • withConfigSourceName

        public ConfigValue withConfigSourceName​(String configSourceName)
      • withConfigSourceOrdinal

        public ConfigValue withConfigSourceOrdinal​(int configSourceOrdinal)
      • withConfigSourcePosition

        public ConfigValue withConfigSourcePosition​(int configSourcePosition)
      • withLineNumber

        public ConfigValue withLineNumber​(int lineNumber)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object