Interface Converter<SOURCE,TARGET>
-
- Type Parameters:
SOURCE
- the type of the source objectTARGET
- the type of the destination object
- All Superinterfaces:
org.springframework.core.convert.converter.Converter<SOURCE,TARGET>
- All Known Subinterfaces:
ConfigurableConverter<SOURCE,TARGET,OPTION>
,ConfigurableSubtypeConverter<SOURCE,TARGET,OPTION>
,ContextualConverter<SOURCE,TARGET,CONTEXT>
- All Known Implementing Classes:
AbstractB2BFlexibleSearchConverter
,AbstractContextualPopulatingConverter
,AbstractConverter
,AbstractDynamicConverter
,AbstractErrorConverter
,AbstractLocalizedErrorConverter
,AbstractOrderRaoToCurrencyConverter
,AbstractOrderRaoToOrderConverter
,AbstractPopulatingConverter
,AbstractPopulatingDynamicConverter
,AbstractSolrConverter
,AggregatedStatisticsConverter
,AsnEntryModelPopulatingConverter
,AsnModelPopulatingConverter
,AuthenticationExceptionToLabelConverter
,CartModificationDataErrorConverter
,CartModificationDataListErrorConverter
,ComponentTypeStructureConverter
,ContentSlotDataConverter
,ConvertObjectsToCSV
,DefaultConfigurableConverter
,DefaultConfigurableSubtypeAwareConverter
,DefaultConfigurableSubtypeConverter
,DefaultJobLogConverter
,DefaultRuleGroupExecutionRRDConverter
,DefaultSolrProductConverter
,DefaultSolrProductSearchServiceTest.SearchQueryPageableConverter
,DefaultSolrProductSearchServiceTest.SolrSearchRequestConverter
,DefaultSolrProductSearchServiceTest.SolrSearchResponseConverter
,DummyConverterForMockito
,ExceptionConverter
,FaultTolerantConverter
,GenericConverter
,JsonToTrackingEventConverter
,OrderEntryRaoToNumberedLineItemConverter
,PointOfServiceDistanceConverter
,PosConverter
,ProductConverter
,TrackingEventToCsvDataConverter
,ValidationErrorConverter
,ValidationErrorConverter
,WebserviceExceptionConverter
public interface Converter<SOURCE,TARGET> extends org.springframework.core.convert.converter.Converter<SOURCE,TARGET>
Interface for a converter that transforms an object of one type into an object of another type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description TARGET
convert(SOURCE source)
Converts the source object, creating a new instance of the destination typeTARGET
convert(SOURCE source, TARGET prototype)
Convert the source object by filling the prototypedefault java.util.List<TARGET>
convertAll(java.util.Collection<? extends SOURCE> sources)
Convert Collection of SOURCE instances and return Collection of TARGET instances.default java.util.List<TARGET>
convertAllIgnoreExceptions(java.util.Collection<? extends SOURCE> sources)
Convert Collection of SOURCE instances and return Collection of TARGET instances.default org.apache.log4j.Logger
getLogger()
-
-
-
Method Detail
-
convert
TARGET convert(SOURCE source) throws ConversionException
Converts the source object, creating a new instance of the destination type- Specified by:
convert
in interfaceorg.springframework.core.convert.converter.Converter<SOURCE,TARGET>
- Parameters:
source
- the source object- Returns:
- the converted object
- Throws:
ConversionException
- if an error occurs
-
convert
TARGET convert(SOURCE source, TARGET prototype) throws ConversionException
Convert the source object by filling the prototype- Parameters:
source
- the source objectprototype
- the prototype to fill- Returns:
- the converted object, identical to the prototype
- Throws:
ConversionException
- if an error occurs
-
convertAll
default java.util.List<TARGET> convertAll(java.util.Collection<? extends SOURCE> sources) throws ConversionException
Convert Collection of SOURCE instances and return Collection of TARGET instances.- Parameters:
sources
- the source instances- Returns:
- collection of target instances
- Throws:
ConversionException
-
convertAllIgnoreExceptions
default java.util.List<TARGET> convertAllIgnoreExceptions(java.util.Collection<? extends SOURCE> sources)
Convert Collection of SOURCE instances and return Collection of TARGET instances.- Parameters:
sources
- the source instances- Returns:
- collection of target instances
- Throws:
ConversionException
-
getLogger
default org.apache.log4j.Logger getLogger()
-
-