Package io.smallrye.config
Class MapBackedConfigValueConfigSource
java.lang.Object
io.smallrye.config.common.AbstractConfigSource
io.smallrye.config.MapBackedConfigValueConfigSource
- All Implemented Interfaces:
ConfigValueConfigSource,Serializable,org.eclipse.microprofile.config.spi.ConfigSource
- Direct Known Subclasses:
PropertiesConfigSource
public abstract class MapBackedConfigValueConfigSource
extends io.smallrye.config.common.AbstractConfigSource
implements ConfigValueConfigSource
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.smallrye.config.ConfigValueConfigSource
ConfigValueConfigSource.ConfigValueMapStringView, ConfigValueConfigSource.ConfigValueMapView, ConfigValueConfigSource.ConfigValueProperties -
Field Summary
Fields inherited from interface org.eclipse.microprofile.config.spi.ConfigSource
CONFIG_ORDINAL, DEFAULT_ORDINAL -
Constructor Summary
ConstructorsConstructorDescriptionMapBackedConfigValueConfigSource(String name, Map<String, ConfigValue> propertyMap) Construct a new instance.MapBackedConfigValueConfigSource(String name, Map<String, ConfigValue> propertyMap, int defaultOrdinal) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptiongetConfigValue(String propertyName) Return theConfigValuefor the specified property in this configuration source.Return the properties in this configuration source as a Map of String andConfigValue.Methods inherited from class io.smallrye.config.common.AbstractConfigSource
getName, getOrdinal, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.microprofile.config.spi.ConfigSource
getName, getOrdinalMethods inherited from interface io.smallrye.config.ConfigValueConfigSource
getProperties, getValue
-
Constructor Details
-
MapBackedConfigValueConfigSource
Construct a new instance. The config source will use a default ordinal of100and will use a copy of the given map.- Parameters:
name- the config source namepropertyMap- the map to use
-
MapBackedConfigValueConfigSource
public MapBackedConfigValueConfigSource(String name, Map<String, ConfigValue> propertyMap, int defaultOrdinal) Construct a new instance. The config source will use the given default ordinal, and will use a copy of the given map.- Parameters:
name- the config source namepropertyMap- the map to usedefaultOrdinal- the default ordinal to use if one is not given in the map
-
-
Method Details
-
getPropertyNames
- Specified by:
getPropertyNamesin interfaceorg.eclipse.microprofile.config.spi.ConfigSource
-
getConfigValue
Description copied from interface:ConfigValueConfigSourceReturn theConfigValuefor the specified property in this configuration source.- Specified by:
getConfigValuein interfaceConfigValueConfigSource- Parameters:
propertyName- the property name- Returns:
- the ConfigValue, or
nullif the property is not present
-
getConfigValueProperties
Description copied from interface:ConfigValueConfigSourceReturn the properties in this configuration source as a Map of String andConfigValue.- Specified by:
getConfigValuePropertiesin interfaceConfigValueConfigSource- Returns:
- a map containing properties of this configuration source
-