Interface Converter<SOURCE,​TARGET>

    • 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 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 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()