S - D - public abstract class BidirectionalConverter<S,D> extends CustomConverter<Object,Object> implements Converter<Object,Object>
| Modifier and Type | Class and Description |
|---|---|
static class |
BidirectionalConverter.Reversed<S,D>
Provides a reversed facade to a given converter
|
destinationType, mapperFacade, sourceType| Constructor and Description |
|---|
BidirectionalConverter() |
| 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 mappingContext)
Perform the conversion of
source into a new instance of
destinationType. |
abstract S |
convertFrom(D source,
Type<S> destinationType,
MappingContext mappingContext) |
abstract D |
convertTo(S source,
Type<D> destinationType,
MappingContext mappingContext) |
BidirectionalConverter<D,S> |
reverse() |
String |
toString() |
equals, getAType, getBType, hashCode, setMapperFacadeclone, finalize, getClass, notify, notifyAll, wait, wait, waitsetMapperFacadegetAType, getBTypepublic abstract D convertTo(S source, Type<D> destinationType, MappingContext mappingContext)
public abstract S convertFrom(D source, Type<S> destinationType, MappingContext mappingContext)
public Object convert(Object source, Type<? extends Object> destinationType, MappingContext mappingContext)
Convertersource into a new instance of
destinationType.convert in interface Converter<Object,Object>source - the source object to be converteddestinationType - the destination type to producemappingContext - since converters now have access to MapperFacade,
they have to pass mapping contextdestinationTypepublic boolean canConvert(Type<?> sourceType, Type<?> destinationType)
ConvertersourceType to destinationType.canConvert in interface Converter<Object,Object>canConvert in class CustomConverter<Object,Object>public String toString()
toString in class CustomConverter<Object,Object>public BidirectionalConverter<D,S> reverse()
Copyright © 2019 Glasnost. All rights reserved.