S - The source type@SPI public interface MultiValueConverter<S> extends Prioritized
Collection or
sub-interfacesCOMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Class<S> sourceType,
Class<?> multiValueType)
Accept the source type and target type or not
|
Object |
convert(S source,
Class<?> multiValueType,
Class<?> elementType)
Convert the source to be the multiple value
|
static <T> T |
convertIfPossible(Object source,
Class<?> multiValueType,
Class<?> elementType) |
static MultiValueConverter<?> |
find(Class<?> sourceType,
Class<?> targetType)
Find the
MultiValueConverter instance from ExtensionLoader with the specified source and target type |
default Class<S> |
getSourceType()
Get the source type
|
compareTo, getPriorityboolean accept(Class<S> sourceType, Class<?> multiValueType)
sourceType - the source typemultiValueType - the multi-value typetrue, or falseObject convert(S source, Class<?> multiValueType, Class<?> elementType)
source - the source-typed valuemultiValueType - the multi-value typeelementType - the element typestatic MultiValueConverter<?> find(Class<?> sourceType, Class<?> targetType)
MultiValueConverter instance from ExtensionLoader with the specified source and target typesourceType - the source typetargetType - the target typenull if not foundExtensionLoader.getSupportedExtensionInstances()Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.