Interface MultiValueConverter<S>
- Type Parameters:
S- The source type
- All Superinterfaces:
Comparable<Prioritized>,Prioritized
- All Known Subinterfaces:
StringToMultiValueConverter
- All Known Implementing Classes:
StringToArrayConverter,StringToBlockingDequeConverter,StringToBlockingQueueConverter,StringToCollectionConverter,StringToDequeConverter,StringToIterableConverter,StringToListConverter,StringToNavigableSetConverter,StringToQueueConverter,StringToSetConverter,StringToSortedSetConverter,StringToTransferQueueConverter
An interface to convert the source-typed value to multiple value, e.g , Java array,
Collection or
sub-interfaces- Since:
- 2.7.6
-
Field Summary
Fields inherited from interface org.apache.dubbo.common.lang.Prioritized
COMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY -
Method Summary
Modifier and TypeMethodDescriptionbooleanAccept the source type and target type or notConvert the source to be the multiple valuestatic <T> TconvertIfPossible(Object source, Class<?> multiValueType, Class<?> elementType) Deprecated.will be removed in 3.3.0static MultiValueConverter<?> Deprecated.will be removed in 3.3.0Get the source typeMethods inherited from interface org.apache.dubbo.common.lang.Prioritized
compareTo, getPriority
-
Method Details
-
accept
Accept the source type and target type or not- Parameters:
sourceType- the source typemultiValueType- the multi-value type- Returns:
- if accepted, return
true, orfalse
-
convert
Convert the source to be the multiple value- Parameters:
source- the source-typed valuemultiValueType- the multi-value typeelementType- the element type- Returns:
-
getSourceType
Get the source type- Returns:
- non-null
-
find
Deprecated.will be removed in 3.3.0Find theMultiValueConverterinstance fromExtensionLoaderwith the specified source and target type- Parameters:
sourceType- the source typetargetType- the target type- Returns:
nullif not found- Since:
- 2.7.8
- See Also:
-
convertIfPossible
@Deprecated static <T> T convertIfPossible(Object source, Class<?> multiValueType, Class<?> elementType) Deprecated.will be removed in 3.3.0
-