Package io.smallrye.config.inject
Class ConfigProducerUtil
java.lang.Object
io.smallrye.config.inject.ConfigProducerUtil
Actual implementations for producer method in CDI producer
ConfigProducer.- Author:
- Gunnar Hilling
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TgetValue(jakarta.enterprise.inject.spi.InjectionPoint injectionPoint, org.eclipse.microprofile.config.Config config) Retrieves a converted configuration value fromConfig.static <T> TgetValue(String name, Type type, String defaultValue, org.eclipse.microprofile.config.Config config) Retrieves a converted configuration value fromConfig.
-
Method Details
-
getValue
public static <T> T getValue(jakarta.enterprise.inject.spi.InjectionPoint injectionPoint, org.eclipse.microprofile.config.Config config) Retrieves a converted configuration value fromConfig.- Parameters:
injectionPoint- theInjectionPointwhere the configuration value will be injectedconfig- the currentConfiginstance.- Returns:
- the converted configuration value.
-
getValue
public static <T> T getValue(String name, Type type, String defaultValue, org.eclipse.microprofile.config.Config config) Retrieves a converted configuration value fromConfig.- Parameters:
name- the name of the configuration property.type- theTypeof the configuration value to convert.defaultValue- the default value to use if no configuration value is found.config- the currentConfiginstance.- Returns:
- the converted configuration value.
-