Package com.saperion.util.conversion
Class DefaultConversionManager
java.lang.Object
com.saperion.util.conversion.DefaultConversionManager
- All Implemented Interfaces:
ConversionManager
- Direct Known Subclasses:
DefaultTypeConversionManager
Abstract implementation of
ConversionManager. Derived classes are expected
to define their conversions by various calls to
addConverter(Class, Class, com.saperion.common.lang.conversion.Converter)
in their constructor.- Author:
- jschwarz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <SourceType,TargetType>
voidaddConverter(Class<SourceType> sourceTypeClass, Class<TargetType> targetTypeClass, Converter<SourceType, TargetType> converter) protected <SourceType,TargetType>
Converter<SourceType,TargetType> findConverterInMap(Class<TargetType> targetClass, Map<Class<?>, Converter<?, ?>> converterMap) <SourceType,TargetType>
Converter<SourceType,TargetType> getConverter(Class<SourceType> sourceClass, Class<TargetType> targetClass) <SourceType>
Converter<SourceType,?> getDefaultConverterFrom(Class<SourceType> sourceClass)
-
Constructor Details
-
DefaultConversionManager
public DefaultConversionManager()
-
-
Method Details
-
addConverter
-
getConverter
public <SourceType,TargetType> Converter<SourceType,TargetType> getConverter(Class<SourceType> sourceClass, Class<TargetType> targetClass) - Specified by:
getConverterin interfaceConversionManager
-
findConverterInMap
-
getDefaultConverterFrom
- Specified by:
getDefaultConverterFromin interfaceConversionManager
-