Interface Converter<SOURCE,TARGET>

Type Parameters:
SOURCE - the type of the source object
TARGET - 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, AbstractPopulatingConverter, AbstractPopulatingDynamicConverter, AbstractSolrConverter, AggregatedStatisticsConverter, AsnEntryModelPopulatingConverter, AsnModelPopulatingConverter, AuthenticationExceptionToLabelConverter, CartModificationDataErrorConverter, CartModificationDataErrorConverter, CartModificationDataListErrorConverter, CartModificationDataListErrorConverter, CartVoucherValidationErrorConverter, CartVoucherValidationErrorConverter, CartVoucherValidationListErrorConverter, CartVoucherValidationListErrorConverter, ComponentTypeStructureConverter, ContentSlotDataConverter, ConvertObjectsToCSV, DefaultCmsUrlChangeEventConverter, DefaultConfigurableConverter, DefaultConfigurableSubtypeAwareConverter, DefaultConfigurableSubtypeConverter, DefaultJobLogConverter, DefaultSolrFacetSearchProductSearchStrategyTest.SearchQueryPageableConverter, DefaultSolrFacetSearchProductSearchStrategyTest.SolrSearchRequestConverter, DefaultSolrFacetSearchProductSearchStrategyTest.SolrSearchResponseConverter, DefaultSolrProductConverter, 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

    Modifier and Type
    Method
    Description
    convert(SOURCE source)
    Converts the source object, creating a new instance of the destination type
    convert(SOURCE source, TARGET prototype)
    Convert the source object by filling the prototype
    default List<TARGET>
    convertAll(Collection<? extends SOURCE> sources)
    Convert Collection of SOURCE instances and return Collection of TARGET instances.
    default List<TARGET>
    Convert Collection of SOURCE instances and return Collection of TARGET instances.
    default org.apache.log4j.Logger
     

    Methods inherited from interface org.springframework.core.convert.converter.Converter

    andThen
  • Method Details

    • convert

      TARGET convert(SOURCE source) throws ConversionException
      Converts the source object, creating a new instance of the destination type
      Specified by:
      convert in interface org.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 object
      prototype - the prototype to fill
      Returns:
      the converted object, identical to the prototype
      Throws:
      ConversionException - if an error occurs
    • convertAll

      default List<TARGET> convertAll(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 List<TARGET> convertAllIgnoreExceptions(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()