Class AbstractDynamicConverter<SOURCE,TARGET>
- java.lang.Object
-
- de.hybris.eventtracking.services.converters.AbstractDynamicConverter<SOURCE,TARGET>
-
- All Implemented Interfaces:
Populator<SOURCE,TARGET>,Converter<SOURCE,TARGET>,org.springframework.core.convert.converter.Converter<SOURCE,TARGET>
- Direct Known Subclasses:
AbstractPopulatingDynamicConverter
public abstract class AbstractDynamicConverter<SOURCE,TARGET> extends java.lang.Object implements Converter<SOURCE,TARGET>, Populator<SOURCE,TARGET>
-
-
Constructor Summary
Constructors Constructor Description AbstractDynamicConverter(TypeResolver<SOURCE,TARGET> typeResolver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TARGETconvert(SOURCE source)Converts the source object, creating a new instance of the destination typeTARGETconvert(SOURCE source, TARGET prototype)Convert the source object by filling the prototypeprotected TARGETcreateTarget(java.lang.Class<? extends TARGET> targetClass)protected TARGETcreateTargetFromSource(SOURCE source)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.servicelayer.dto.converter.Converter
convertAll, convertAllIgnoreExceptions, getLogger
-
-
-
-
Constructor Detail
-
AbstractDynamicConverter
public AbstractDynamicConverter(TypeResolver<SOURCE,TARGET> typeResolver)
-
-
Method Detail
-
convert
public TARGET convert(SOURCE source) throws ConversionException
Description copied from interface:ConverterConverts the source object, creating a new instance of the destination type
-
convert
public TARGET convert(SOURCE source, TARGET prototype) throws ConversionException
Description copied from interface:ConverterConvert the source object by filling the prototype- Specified by:
convertin interfaceConverter<SOURCE,TARGET>- Parameters:
source- the source objectprototype- the prototype to fill- Returns:
- the converted object, identical to the prototype
- Throws:
ConversionException- if an error occurs
-
-