public interface LeafValueHandler
MapperImpl to convert "simple" values from their
read values to the desired type.
The bean mapper handles complex types such as maps and collections, and recursively calls the bean mapping process accordingly. This class complements the mapper by halting this process and providing "leaf values" to be set into Java beans.
Default implementation is provided by StandardLeafValueHandlers.getDefaultLeafValueHandler().
| Modifier and Type | Method and Description |
|---|---|
Object |
convert(TypeInformation typeInformation,
Object value)
Converts the given value to the given class, if possible.
|
Object |
toExportValue(Object value)
Converts the given value to a type more suitable for exporting.
|
@Nullable Object convert(TypeInformation typeInformation, @Nullable Object value)
null or an object of the class type.typeInformation - the required typevalue - the value to convert@Nullable Object toExportValue(@Nullable Object value)
Property.toExportValue(T) is called on a bean property.
Returns null if the leaf value handler cannot handle the value.
Return MapperImpl.RETURN_NULL to signal that null should be used
as the export value (returning null itself means this leaf value handler cannot handle it).
value - the value to convert to an export value, if possibleCopyright © 2016–2018 The AuthMe Team. All rights reserved.