|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.ioc.services.CoercionTuple<S,T>
S
- source (input) typeT
- target (output) typepublic final class CoercionTuple<S,T>
An immutable object that represents a mapping from one type to another. This is also the contribution type when
building the 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 Summary | |
---|---|
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. |
Method Summary | ||
---|---|---|
static
|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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()Method Detail |
---|
public static <S,T> CoercionTuple<S,T> create(Class<S> sourceType, Class<T> targetType, Coercion<S,T> coercion)
public String toString()
toString
in class Object
public Coercion<S,T> getCoercion()
public Class<S> getSourceType()
public Class<T> getTargetType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |