|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ConverterFactory
Interface describing a mechanism that provides instances of ContentTypeConverter for a given source and target data type.
| Method Summary | ||
|---|---|---|
|
getConverter(Class<S> sourceContentType,
Class<T> targetContentType)
Returns a converter that is capable of converting IntermediateRepresentation object containing the given sourceContentType to the given targetContentType. |
|
|
hasConverter(Class<S> sourceContentType,
Class<T> targetContentType)
Indicates whether this factory contains a converter capable of converting the given sourceContentType into the targetContentType. |
|
| Method Detail |
|---|
<S,T> boolean hasConverter(Class<S> sourceContentType,
Class<T> targetContentType)
sourceContentType into the targetContentType.
S - The type of source data for which a converter must be availableT - The type of target data for which a converter must be availablesourceContentType - The type of source data for which a converter must be availabletargetContentType - The type of target data for which a converter must be available
true if a converter is available, otherwise false.
<S,T> ContentTypeConverter<S,T> getConverter(Class<S> sourceContentType,
Class<T> targetContentType)
sourceContentType to the given targetContentType.
S - The source content typeT - The target content typesourceContentType - The type of data the converter accepts as inputtargetContentType - The type of data the converter produces
sourceContentType to
targetContentType
CannotConvertBetweenTypesException - when no suitable converter can be found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||