public class SmallRyeConfig extends Object implements Config, Serializable
Modifier | Constructor and Description |
---|---|
protected |
SmallRyeConfig(List<ConfigSource> configSources,
Map<Type,Converter<?>> converters) |
Modifier and Type | Method and Description |
---|---|
<T> T |
convert(String value,
Class<T> asType) |
Iterable<ConfigSource> |
getConfigSources() |
<T> Converter<T> |
getConverter(Class<T> asType) |
<T> Optional<T> |
getOptionalValue(String name,
Class<T> aClass)
Return the resolved property value with the specified type for the
specified property name from the underlying
ConfigSources . |
Iterable<String> |
getPropertyNames()
Return a collection of property names.
|
<T> T |
getValue(String name,
Class<T> aClass)
Return the resolved property value with the specified type for the
specified property name from the underlying
ConfigSources . |
<T,C extends Collection<T>> |
getValues(String name,
Class<T> itemClass,
IntFunction<C> collectionFactory) |
protected SmallRyeConfig(List<ConfigSource> configSources, Map<Type,Converter<?>> converters)
public <T,C extends Collection<T>> C getValues(String name, Class<T> itemClass, IntFunction<C> collectionFactory)
public <T> T getValue(String name, Class<T> aClass)
Config
ConfigSources
.
If this method gets used very often then consider to locally store the configured value.public <T> Optional<T> getOptionalValue(String name, Class<T> aClass)
Config
ConfigSources
.
If this method is used very often then consider to locally store the configured value.getOptionalValue
in interface Config
T
- The property typename
- The configuration propertyName.aClass
- The type into which the resolve property value should be convertedpublic Iterable<String> getPropertyNames()
Config
getPropertyNames
in interface Config
public Iterable<ConfigSource> getConfigSources()
getConfigSources
in interface Config
configsources
sorted with descending ordinal and ConfigSource nameCopyright © 2019 JBoss by Red Hat. All rights reserved.