public class WrapperToPrimitiveConverter extends CustomConverter<Object,Object>
destinationType, mapperFacade, sourceType| Constructor and Description |
|---|
WrapperToPrimitiveConverter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(Type<?> sourceType,
Type<?> destinationType)
Answers whether this converter can be used to handle the conversion of
sourceType to destinationType. |
Object |
convert(Object source,
Type<? extends Object> destinationType,
MappingContext context)
Perform the conversion of
source into a new instance of
destinationType. |
equals, getAType, getBType, hashCode, setMapperFacade, toStringpublic boolean canConvert(Type<?> sourceType, Type<?> destinationType)
ConvertersourceType to destinationType.canConvert in interface Converter<Object,Object>canConvert in class CustomConverter<Object,Object>public Object convert(Object source, Type<? extends Object> destinationType, MappingContext context)
Convertersource into a new instance of
destinationType.source - the source object to be converteddestinationType - the destination type to producecontext - since converters now have access to MapperFacade,
they have to pass mapping contextdestinationTypeCopyright © 2017 Glasnost. All Rights Reserved.