Stream to and from a collection or array, converting the
element type if necessary.
| Modifier and Type | Field and Description |
|---|---|
| private final ConversionService | |
| private static final Set | |
| private static final TypeDescriptor |
| 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 |
| private Object | |
| private Object | |
| private static Set | |
| 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 |
| public boolean | matchesFromStream(TypeDescriptor
the type of the stream elements elementType, TypeDescriptor the type to convert to targetType)Validate that a |
| public boolean | matchesToStream(TypeDescriptor
the type of the stream elements elementType, TypeDescriptor the type to convert from sourceType)Validate that the specified |
| conversionService | back to summary |
|---|---|
| private final ConversionService conversionService | |
| CONVERTIBLE_TYPES | back to summary |
|---|---|
| private static final Set<GenericConverter. | |
| STREAM_TYPE | back to summary |
|---|---|
| private static final TypeDescriptor STREAM_TYPE | |
| StreamConverter | back to summary |
|---|---|
| public StreamConverter(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
| |
| convertFromStream | back to summary |
|---|---|
private Object convertFromStream(Stream<?> source, TypeDescriptor streamType, TypeDescriptor targetType)
| |
| convertToStream | back to summary |
|---|---|
| private Object convertToStream(Object source, TypeDescriptor sourceType, TypeDescriptor streamType) | |
| createConvertibleTypes | back to summary |
|---|---|
| private static Set | |
| 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
| |
| matchesFromStream | back to summary |
|---|---|
| public boolean matchesFromStream(TypeDescriptor elementType, TypeDescriptor targetType) Validate that a
| |
| matchesToStream | back to summary |
|---|---|
| public boolean matchesToStream(TypeDescriptor elementType, TypeDescriptor sourceType) Validate that the specified
| |