public class EnumConverter extends CustomConverter<C,D>
destinationType, mapperFacade, sourceType| Constructor and Description |
|---|
EnumConverter() |
| 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. |
String |
toString() |
equals, getAType, getBType, hashCode, setMapperFacadepublic 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 contextdestinationTypepublic String toString()
toString in class CustomConverter<C,D>Copyright © 2017 Glasnost. All Rights Reserved.