Package io.smallrye.config
Class ConfigValue
- java.lang.Object
-
- io.smallrye.config.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.ConfigValueThe 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
ConfigValueConfigSourceandConfigSourceInterceptorto expose the Configuration lookup metadata.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConfigValue.ConfigValueBuilder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConfigValue.ConfigValueBuilderbuilder()booleanequals(Object o)StringgetConfigSourceName()intgetConfigSourceOrdinal()intgetConfigSourcePosition()intgetLineNumber()StringgetLocation()StringgetName()StringgetNameProfiled()StringgetProfile()StringgetRawValue()StringgetSourceName()intgetSourceOrdinal()StringgetValue()inthashCode()StringtoString()ConfigValuewithConfigSourceName(String configSourceName)ConfigValuewithConfigSourceOrdinal(int configSourceOrdinal)ConfigValuewithConfigSourcePosition(int configSourcePosition)ConfigValuewithLineNumber(int lineNumber)ConfigValuewithName(String name)ConfigValuewithProfile(String profile)ConfigValuewithValue(String value)
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceorg.eclipse.microprofile.config.ConfigValue
-
getNameProfiled
public String getNameProfiled()
-
getValue
public String getValue()
- Specified by:
getValuein interfaceorg.eclipse.microprofile.config.ConfigValue
-
getRawValue
public String getRawValue()
- Specified by:
getRawValuein interfaceorg.eclipse.microprofile.config.ConfigValue
-
getProfile
public String getProfile()
-
getSourceName
public String getSourceName()
- Specified by:
getSourceNamein interfaceorg.eclipse.microprofile.config.ConfigValue
-
getSourceOrdinal
public int getSourceOrdinal()
- Specified by:
getSourceOrdinalin interfaceorg.eclipse.microprofile.config.ConfigValue
-
getConfigSourceName
public String getConfigSourceName()
-
getConfigSourceOrdinal
public int getConfigSourceOrdinal()
-
getConfigSourcePosition
public int getConfigSourcePosition()
-
getLineNumber
public int getLineNumber()
-
getLocation
public String getLocation()
-
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)
-
builder
public static ConfigValue.ConfigValueBuilder builder()
-
-