private class FormattingConversionService.AnnotationParserConverter extends java.lang.Object implements ConditionalGenericConverter
GenericConverter.ConvertiblePair| Modifier and Type | Field and Description |
|---|---|
private AnnotationFormatterFactory |
annotationFormatterFactory |
private java.lang.Class<? extends java.lang.annotation.Annotation> |
annotationType |
private java.lang.Class<?> |
fieldType |
| Constructor and Description |
|---|
FormattingConversionService.AnnotationParserConverter(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
AnnotationFormatterFactory<?> annotationFormatterFactory,
java.lang.Class<?> fieldType) |
| 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.
|
boolean |
matches(TypeDescriptor sourceType,
TypeDescriptor targetType)
Should the conversion from
sourceType to targetType currently under
consideration be selected? |
java.lang.String |
toString() |
private java.lang.Class<? extends java.lang.annotation.Annotation> annotationType
private AnnotationFormatterFactory annotationFormatterFactory
private java.lang.Class<?> fieldType
public FormattingConversionService.AnnotationParserConverter(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
AnnotationFormatterFactory<?> annotationFormatterFactory,
java.lang.Class<?> fieldType)
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 GenericConverterpublic boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType)
ConditionalConvertersourceType to targetType currently under
consideration be selected?matches in interface ConditionalConvertersourceType - the type descriptor of the field we are converting fromtargetType - the type descriptor of the field we are converting topublic java.lang.Object convert(java.lang.Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType)
GenericConverterconvert in interface GenericConvertersource - 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