public class PassThroughConverter extends CustomConverter<Object,Object>
destinationType, mapperFacade, sourceType| Constructor and Description |
|---|
PassThroughConverter(Type... types)
Constructs a new PassThroughConverter configured to treat the provided
list of types as immutable.
|
| 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. |
boolean |
equals(Object obj) |
int |
hashCode() |
String |
toString() |
getAType, getBType, setMapperFacadepublic PassThroughConverter(Type... types)
types - one or more types that should be treated as immutablepublic 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<Object,Object>public int hashCode()
hashCode in class CustomConverter<Object,Object>public boolean equals(Object obj)
equals in class CustomConverter<Object,Object>Copyright © 2017 Glasnost. All Rights Reserved.