S - The source typeT - The target type@SPI(scope=FRAMEWORK) @FunctionalInterface public interface Converter<S,T> extends Prioritized
COMPARATOR, MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY| Modifier and Type | Method and Description |
|---|---|
default boolean |
accept(Class<?> sourceType,
Class<?> targetType)
Accept the source type and target type or not
|
T |
convert(S source)
Convert the source-typed value to the target-typed value
|
default Class<S> |
getSourceType()
Get the source type
|
default Class<T> |
getTargetType()
Get the target type
|
compareTo, getPrioritydefault boolean accept(Class<?> sourceType, Class<?> targetType)
sourceType - the source typetargetType - the target typetrue, or falseT convert(S source)
source - the source-typed valueCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.