public class ConverterSupport extends Object
ConfigBuilder
with
Converter
implementations loaded from ServiceLoader
.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_QUARKUS_CONVERTER_PRIORITY
Default
Converter priority with value 200 to
be used for all Quarkus converters. |
static int |
DEFAULT_SMALLRYE_CONVERTER_PRIORITY
Default
Converter priority with value 100
to be used for all discovered converters in case when no Priority annotation is
available on the converter class. |
Modifier and Type | Method and Description |
---|---|
(package private) static int |
getConverterPriority(Class<? extends org.eclipse.microprofile.config.spi.Converter<?>> converterClass)
Get
Converter priority by looking for a Priority annotation which can be put
on the converter type. |
static void |
populateConverters(org.eclipse.microprofile.config.spi.ConfigBuilder builder)
|
public static final int DEFAULT_SMALLRYE_CONVERTER_PRIORITY
Converter
priority with value 100
to be used for all discovered converters in case when no Priority
annotation is
available on the converter class.public static final int DEFAULT_QUARKUS_CONVERTER_PRIORITY
Converter
priority with value 200 to
be used for all Quarkus converters. The reason why Quarkus priority is higher than a default
one, which is 100, is because Quarkus converters
should be used even if some third-party JAR bundles its own converters, unless these 3rd
party converters priority is explicitly higher to override Quarkus ones. This way we can be
sure that things have a good chance of consistent interoperability.public static void populateConverters(org.eclipse.microprofile.config.spi.ConfigBuilder builder)
builder
- the ConfigBuilder
static int getConverterPriority(Class<? extends org.eclipse.microprofile.config.spi.Converter<?>> converterClass)
Converter
priority by looking for a Priority
annotation which can be put
on the converter type. If no Priority
annotation is found a default priority of
100 is returned.converterClass
- Copyright © 2019 JBoss by Red Hat. All rights reserved.