private static class FormattingConversionService.ParserConverter extends java.lang.Object implements GenericConverter
GenericConverter.ConvertiblePair
Modifier and Type | Field and Description |
---|---|
private ConversionService |
conversionService |
private java.lang.Class<?> |
fieldType |
private Parser<?> |
parser |
Constructor and Description |
---|
FormattingConversionService.ParserConverter(java.lang.Class<?> fieldType,
Parser<?> parser,
ConversionService conversionService) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
convert(java.lang.Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType)
Convert the source to the targetType described by the TypeDescriptor.
|
java.util.Set<GenericConverter.ConvertiblePair> |
getConvertibleTypes()
Return the source and target types which this converter can convert between.
|
java.lang.String |
toString() |
private java.lang.Class<?> fieldType
private Parser<?> parser
private ConversionService conversionService
public FormattingConversionService.ParserConverter(java.lang.Class<?> fieldType, Parser<?> parser, ConversionService conversionService)
public java.util.Set<GenericConverter.ConvertiblePair> getConvertibleTypes()
GenericConverter
For conditional
converters this method may return
null
to indicate all source-to-target pairs should be considered. *
getConvertibleTypes
in interface GenericConverter
public java.lang.Object convert(java.lang.Object source, TypeDescriptor sourceType, TypeDescriptor targetType)
GenericConverter
convert
in interface GenericConverter
source
- the source object to convert (may be null)sourceType
- the type descriptor of the field we are converting fromtargetType
- the type descriptor of the field we are converting topublic java.lang.String toString()
toString
in class java.lang.Object