S - source (input) typeT - target (output) typepublic final class CoercionTuple<S,T> extends Object
TypeCoercer service. Wraps a
Coercion object that performs the work with additional properties that
describe
the input and output types of the coercion, needed when searching for an appropriate coercion (or sequence of
coercions).| Constructor and Description |
|---|
CoercionTuple(Class<S> sourceType,
Class<T> targetType,
Coercion<S,T> coercion)
Standard constructor, which defaults wrap to true.
|
CoercionTuple(Class<S> sourceType,
Class<T> targetType,
Coercion<S,T> coercion,
boolean wrap)
Internal-use constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static <S,T> CoercionTuple<S,T> |
create(Class<S> sourceType,
Class<T> targetType,
Coercion<S,T> coercion)
Convenience constructor to help with generics.
|
Coercion<S,T> |
getCoercion() |
Class<S> |
getSourceType() |
Class<T> |
getTargetType() |
String |
toString() |
public CoercionTuple(Class<S> sourceType, Class<T> targetType, Coercion<S,T> coercion)
public CoercionTuple(Class<S> sourceType, Class<T> targetType, Coercion<S,T> coercion, boolean wrap)
sourceType - the source (or input) type of the coercion, may be Void.class to indicate a coercion from nulltargetType - the target (or output) type of the coercioncoercion - the object that performs the coercionwrap - if true, the coercion is wrapped to provide a useful toString()public static <S,T> CoercionTuple<S,T> create(Class<S> sourceType, Class<T> targetType, Coercion<S,T> coercion)
public Coercion<S,T> getCoercion()
public Class<S> getSourceType()
public Class<T> getTargetType()
5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.