Class ConfigValue

java.lang.Object
io.smallrye.config.ConfigValue
All Implemented Interfaces:
org.eclipse.microprofile.config.ConfigValue

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.

  • Field Details

  • Method Details

    • 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
    • getValueOrDefault

      public String getValueOrDefault(String defaultValue)
    • getRawValue

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

      public String getProfile()
    • isDefault

      public boolean isDefault()
    • 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()
    • hasProblems

      public boolean hasProblems()
    • getProblems

      public List<ConfigValidationException.Problem> getProblems()
    • withName

      public ConfigValue withName(String name)
    • withValue

      public ConfigValue withValue(String value)
    • withProfile

      public ConfigValue withProfile(String profile)
    • withConfigSourceName

      public ConfigValue withConfigSourceName(String configSourceName)
    • withConfigSourceOrdinal

      public ConfigValue withConfigSourceOrdinal(int configSourceOrdinal)
    • withConfigSourcePosition

      public ConfigValue withConfigSourcePosition(int configSourcePosition)
    • withLineNumber

      public ConfigValue withLineNumber(int lineNumber)
    • noProblems

      public ConfigValue noProblems()
    • withProblems

      public ConfigValue withProblems(List<ConfigValidationException.Problem> problems)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • from

    • builder

      public static ConfigValue.ConfigValueBuilder builder()