Package io.helidon.config.objectmapping
Class ObjectConfigMapperProvider
java.lang.Object
io.helidon.config.objectmapping.ObjectConfigMapperProvider
- All Implemented Interfaces:
ConfigMapperProvider
@Priority(1000)
public class ObjectConfigMapperProvider
extends Object
implements ConfigMapperProvider
Java beans support for configuration.
-
Field Summary
Fields inherited from interface io.helidon.config.spi.ConfigMapperProvider
PRIORITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionA simple mapping function from config node to a typed value based on the expected class.mappers()
Returns a map of mapper functions associated with appropriate target type (Class<?>
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.helidon.config.spi.ConfigMapperProvider
genericTypeMappers, mapper
-
Constructor Details
-
ObjectConfigMapperProvider
public ObjectConfigMapperProvider()
-
-
Method Details
-
mappers
Description copied from interface:ConfigMapperProvider
Returns a map of mapper functions associated with appropriate target type (Class<?>
.Mappers will by automatically registered by
Config.Builder
during bootstrapping ofConfig
unlessdisableld
.- Specified by:
mappers
in interfaceConfigMapperProvider
- Returns:
- a map of config mapper functions, never
null
, though this may return an empty map ifConfigMapperProvider.mapper(Class)
is used instead
-
mapper
Description copied from interface:ConfigMapperProvider
A simple mapping function from config node to a typed value based on the expected class. If more complex type handling or conversion is needed, useConfigMapperProvider.mapper(GenericType)
.- Specified by:
mapper
in interfaceConfigMapperProvider
- Type Parameters:
T
- type returned from conversion- Parameters:
type
- type of the expected mapping result- Returns:
- function to convert config node to the expected type, or empty if the type is not supported by this provider
-