Package io.smallrye.config
Class ConfigValue
java.lang.Object
io.smallrye.config.ConfigValue
- All Implemented Interfaces:
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.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()booleanfrom()intintintgetName()intgetValue()getValueOrDefault(String defaultValue) inthashCode()booleanbooleantoString()withConfigSourceName(String configSourceName) withConfigSourceOrdinal(int configSourceOrdinal) withConfigSourcePosition(int configSourcePosition) withLineNumber(int lineNumber) withProblems(List<ConfigValidationException.Problem> problems) withProfile(String profile)
-
Field Details
-
CONFIG_SOURCE_COMPARATOR
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.eclipse.microprofile.config.ConfigValue
-
getNameProfiled
-
getValue
- Specified by:
getValuein interfaceorg.eclipse.microprofile.config.ConfigValue
-
getValueOrDefault
-
getRawValue
- Specified by:
getRawValuein interfaceorg.eclipse.microprofile.config.ConfigValue
-
getProfile
-
isDefault
public boolean isDefault() -
getSourceName
- Specified by:
getSourceNamein interfaceorg.eclipse.microprofile.config.ConfigValue
-
getSourceOrdinal
public int getSourceOrdinal()- Specified by:
getSourceOrdinalin interfaceorg.eclipse.microprofile.config.ConfigValue
-
getConfigSourceName
-
getConfigSourceOrdinal
public int getConfigSourceOrdinal() -
getConfigSourcePosition
public int getConfigSourcePosition() -
getLineNumber
public int getLineNumber() -
getLocation
-
hasProblems
public boolean hasProblems() -
getProblems
-
withName
-
withValue
-
withProfile
-
withConfigSourceName
-
withConfigSourceOrdinal
-
withConfigSourcePosition
-
withLineNumber
-
noProblems
-
withProblems
-
equals
-
hashCode
public int hashCode() -
toString
-
from
-
builder
-