First, creates a new array of the requested targetType with a length equal to the size of the source Collection. Then sets each collection element into the array. Will perform an element conversion from the collection's parameterized type to the array's component type if necessary.
| Modifier and Type | Field and Description |
|---|---|
| private final ConversionService |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | convert(Object
the source object to convert (may be source, TypeDescriptor null)the type descriptor of the field we are converting from sourceType, TypeDescriptor the type descriptor of the field we are converting to targetType)Implements org. Convert the source object to the targetType described by the |
| public Set | getConvertibleTypes()
Implements org. Return the source and target types that this converter can convert between. |
| public boolean | matches(TypeDescriptor
the type descriptor of the field we are converting from sourceType, TypeDescriptor the type descriptor of the field we are converting to targetType)Implements org. Should the conversion from |
| conversionService | back to summary |
|---|---|
| private final ConversionService conversionService | |
| CollectionToArrayConverter | back to summary |
|---|---|
| public CollectionToArrayConverter(ConversionService conversionService) | |
| convert | back to summary |
|---|---|
| public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) Implements org. Doc from org. Convert the source object to the targetType described by the
| |
| getConvertibleTypes | back to summary |
|---|---|
| public Set Implements org. Doc from org. Return the source and target types that this converter can convert between. Each entry is a convertible source-to-target type pair. For
| |
| matches | back to summary |
|---|---|
| public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) Implements org. Doc from org. Should the conversion from
| |