public class SmallRyeConfig extends Object implements org.eclipse.microprofile.config.Config, Serializable
| Modifier | Constructor and Description |
|---|---|
protected |
SmallRyeConfig(List<org.eclipse.microprofile.config.spi.ConfigSource> configSources,
Map<Type,org.eclipse.microprofile.config.spi.Converter<?>> converters)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConfigSource(org.eclipse.microprofile.config.spi.ConfigSource configSource)
Deprecated.
|
<T> T |
convert(String value,
Class<T> asType) |
Iterable<org.eclipse.microprofile.config.spi.ConfigSource> |
getConfigSources() |
ConfigValue |
getConfigValue(String name) |
<T> org.eclipse.microprofile.config.spi.Converter<T> |
getConverter(Class<T> asType) |
<T> Optional<T> |
getOptionalValue(String name,
Class<T> aClass) |
<T> Optional<T> |
getOptionalValue(String name,
org.eclipse.microprofile.config.spi.Converter<T> converter) |
<T,C extends Collection<T>> |
getOptionalValues(String name,
Class<T> itemClass,
IntFunction<C> collectionFactory) |
<T,C extends Collection<T>> |
getOptionalValues(String name,
org.eclipse.microprofile.config.spi.Converter<T> converter,
IntFunction<C> collectionFactory) |
Iterable<String> |
getPropertyNames() |
String |
getRawValue(String name)
Get the raw value of a configuration property.
|
<T> T |
getValue(String name,
Class<T> aClass) |
<T> T |
getValue(String name,
org.eclipse.microprofile.config.spi.Converter<T> converter) |
<T,C extends Collection<T>> |
getValues(String name,
Class<T> itemClass,
IntFunction<C> collectionFactory) |
<T,C extends Collection<T>> |
getValues(String name,
org.eclipse.microprofile.config.spi.Converter<T> converter,
IntFunction<C> collectionFactory) |
boolean |
rawValueEquals(String name,
String expected)
Determine whether the raw value of a configuration property is exactly equal to the expected given
value.
|
@Deprecated protected SmallRyeConfig(List<org.eclipse.microprofile.config.spi.ConfigSource> configSources, Map<Type,org.eclipse.microprofile.config.spi.Converter<?>> converters)
public <T,C extends Collection<T>> C getValues(String name, Class<T> itemClass, IntFunction<C> collectionFactory)
public <T,C extends Collection<T>> C getValues(String name, org.eclipse.microprofile.config.spi.Converter<T> converter, IntFunction<C> collectionFactory)
public <T> T getValue(String name, Class<T> aClass)
getValue in interface org.eclipse.microprofile.config.Configpublic <T> T getValue(String name, org.eclipse.microprofile.config.spi.Converter<T> converter)
public boolean rawValueEquals(String name, String expected)
name - the property name (must not be null)expected - the expected value (may be null)true if the values are equal, false otherwise@Experimental(value="Extension to the original ConfigSource to allow retrieval of additional metadata on config lookup") public ConfigValue getConfigValue(String name)
public String getRawValue(String name)
name - the property name (must not be null)null if no property value was discovered for the given property namepublic <T> Optional<T> getOptionalValue(String name, Class<T> aClass)
getOptionalValue in interface org.eclipse.microprofile.config.Configpublic <T> Optional<T> getOptionalValue(String name, org.eclipse.microprofile.config.spi.Converter<T> converter)
public <T,C extends Collection<T>> Optional<C> getOptionalValues(String name, Class<T> itemClass, IntFunction<C> collectionFactory)
public <T,C extends Collection<T>> Optional<C> getOptionalValues(String name, org.eclipse.microprofile.config.spi.Converter<T> converter, IntFunction<C> collectionFactory)
public Iterable<String> getPropertyNames()
getPropertyNames in interface org.eclipse.microprofile.config.Configpublic Iterable<org.eclipse.microprofile.config.spi.ConfigSource> getConfigSources()
getConfigSources in interface org.eclipse.microprofile.config.Config@Deprecated public void addConfigSource(org.eclipse.microprofile.config.spi.ConfigSource configSource)
SmallRyeConfigBuilder.withWrapper(UnaryOperator) will not be applied.configSource - the new config source (must not be null)public <T> org.eclipse.microprofile.config.spi.Converter<T> getConverter(Class<T> asType)
Copyright © 2018–2020. All rights reserved.