接口 MultiValueConverter<S>
-
- 类型参数:
S
- The source type
- 所有超级接口:
java.lang.Comparable<Prioritized>
,Prioritized
- 所有已知子接口:
StringToMultiValueConverter
- 所有已知实现类:
StringToArrayConverter
,StringToBlockingDequeConverter
,StringToBlockingQueueConverter
,StringToCollectionConverter
,StringToDequeConverter
,StringToIterableConverter
,StringToListConverter
,StringToNavigableSetConverter
,StringToQueueConverter
,StringToSetConverter
,StringToSortedSetConverter
,StringToTransferQueueConverter
public interface MultiValueConverter<S> extends Prioritized
An interface to convert the source-typed value to multiple value, e.g , Java array,Collection
or sub-interfaces- 从以下版本开始:
- 1.0.0
-
-
字段概要
-
从接口继承的字段 io.microsphere.lang.Prioritized
COMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY
-
-
方法概要
所有方法 静态方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 boolean
accept(java.lang.Class<S> sourceType, java.lang.Class<?> multiValueType)
Accept the source type and target type or notjava.lang.Object
convert(S source, java.lang.Class<?> multiValueType, java.lang.Class<?> elementType)
Convert the source to be the multiple valuestatic <T> T
convertIfPossible(java.lang.Object source, java.lang.Class<?> multiValueType, java.lang.Class<?> elementType)
static MultiValueConverter<?>
find(java.lang.Class<?> sourceType, java.lang.Class<?> targetType)
Find theMultiValueConverter
instance fromServiceLoader
with the specified source and target typedefault java.lang.Class<S>
getSourceType()
Get the source type-
从接口继承的方法 io.microsphere.lang.Prioritized
compareTo, getPriority
-
-
-
-
方法详细资料
-
accept
boolean accept(java.lang.Class<S> sourceType, java.lang.Class<?> multiValueType)
Accept the source type and target type or not- 参数:
sourceType
- the source typemultiValueType
- the multi-value type- 返回:
- if accepted, return
true
, orfalse
-
convert
java.lang.Object convert(S source, java.lang.Class<?> multiValueType, java.lang.Class<?> elementType)
Convert the source to be the multiple value- 参数:
source
- the source-typed valuemultiValueType
- the multi-value typeelementType
- the element type- 返回:
-
getSourceType
default java.lang.Class<S> getSourceType()
Get the source type- 返回:
- non-null
-
find
static MultiValueConverter<?> find(java.lang.Class<?> sourceType, java.lang.Class<?> targetType)
Find theMultiValueConverter
instance fromServiceLoader
with the specified source and target type- 参数:
sourceType
- the source typetargetType
- the target type- 返回:
null
if not found
-
convertIfPossible
static <T> T convertIfPossible(java.lang.Object source, java.lang.Class<?> multiValueType, java.lang.Class<?> elementType)
-
-