org.springframework.format.support
Class FormattingConversionService.AnnotationParserConverter
java.lang.Object
org.springframework.format.support.FormattingConversionService.AnnotationParserConverter
- All Implemented Interfaces:
- ConditionalGenericConverter, GenericConverter
- Enclosing class:
- FormattingConversionService
private class FormattingConversionService.AnnotationParserConverter
- extends java.lang.Object
- implements ConditionalGenericConverter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
annotationType
private java.lang.Class<? extends java.lang.annotation.Annotation> annotationType
annotationFormatterFactory
private AnnotationFormatterFactory annotationFormatterFactory
fieldType
private java.lang.Class<?> fieldType
FormattingConversionService.AnnotationParserConverter
public FormattingConversionService.AnnotationParserConverter(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
AnnotationFormatterFactory<?> annotationFormatterFactory,
java.lang.Class<?> fieldType)
getConvertibleTypes
public java.util.Set<GenericConverter.ConvertiblePair> getConvertibleTypes()
- Description copied from interface:
GenericConverter
- Return the source and target types which this converter can convert between.
Each entry is a convertible source-to-target type pair.
- Specified by:
getConvertibleTypes
in interface GenericConverter
matches
public boolean matches(TypeDescriptor sourceType,
TypeDescriptor targetType)
- Description copied from interface:
ConditionalGenericConverter
- Should the converter from
sourceType
to targetType
currently under consideration be selected?
- Specified by:
matches
in interface ConditionalGenericConverter
- Parameters:
sourceType
- the type descriptor of the field we are converting fromtargetType
- the type descriptor of the field we are converting to
- Returns:
- true if conversion should be performed, false otherwise
convert
public java.lang.Object convert(java.lang.Object source,
TypeDescriptor sourceType,
TypeDescriptor targetType)
- Description copied from interface:
GenericConverter
- Convert the source to the targetType described by the TypeDescriptor.
- Specified by:
convert
in interface GenericConverter
- Parameters:
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 to
- Returns:
- the converted object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object