final class ArrayToArrayConverter extends java.lang.Object implements ConditionalGenericConverter
CollectionToArrayConverter
to perform the target array conversion.GenericConverter.ConvertiblePair
Modifier and Type | Field and Description |
---|---|
private CollectionToArrayConverter |
helperConverter |
Constructor and Description |
---|
ArrayToArrayConverter(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.
|
boolean |
matches(TypeDescriptor sourceType,
TypeDescriptor targetType)
Should the converter from
sourceType to targetType
currently under consideration be selected? |
private final CollectionToArrayConverter helperConverter
public ArrayToArrayConverter(ConversionService conversionService)
public java.util.Set<GenericConverter.ConvertiblePair> getConvertibleTypes()
GenericConverter
Each entry is a convertible source-to-target type pair.
getConvertibleTypes
in interface GenericConverter
public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType)
ConditionalGenericConverter
sourceType
to targetType
currently under consideration be selected?matches
in interface ConditionalGenericConverter
sourceType
- 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)
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 to