Interface ConfigurableConverter<SOURCE,​TARGET,​OPTION>

    • Method Detail

      • convert

        default TARGET convert​(SOURCE source)
        Description copied from interface: Converter
        Converts the source object, creating a new instance of the destination type
        Specified by:
        convert in interface Converter<SOURCE,​TARGET>
        Specified by:
        convert in interface org.springframework.core.convert.converter.Converter<SOURCE,​TARGET>
        Parameters:
        source - the source object
        Returns:
        the converted object
      • convert

        default TARGET convert​(SOURCE source,
                               TARGET prototype)
        Description copied from interface: Converter
        Convert the source object by filling the prototype
        Specified by:
        convert in interface Converter<SOURCE,​TARGET>
        Parameters:
        source - the source object
        prototype - the prototype to fill
        Returns:
        the converted object, identical to the prototype
      • convert

        default TARGET convert​(SOURCE source,
                               java.util.Collection<OPTION> options)
        Converts a SOURCE object into a TARGET object using provided Options.
        Parameters:
        source - - the source object
        options - - the collection of convert options
        Returns:
        the TARGET object
        Throws:
        ConversionException - when an error occurs during the conversion process
      • convert

        TARGET convert​(SOURCE source,
                       TARGET target,
                       java.util.Collection<OPTION> options)
        Converts a SOURCE object into a TARGET object using provided Options.
        Parameters:
        source - - the source object
        target - - the target object
        options - - the collection of convert options
        Returns:
        the TARGET object
        Throws:
        ConversionException - when an error occurs during the conversion process
      • convertAll

        default java.util.List<TARGET> convertAll​(java.util.Collection<? extends SOURCE> sources,
                                                  OPTION... options)
        Converts a Collection SOURCE objects into a List of TARGET objects using provided as array Options.
        Parameters:
        sources - - the source objects
        options - - the array of convert options
        Returns:
        the List of TARGET objects
        Throws:
        ConversionException - when an error occurs during the conversion process
      • convertAll

        default java.util.List<TARGET> convertAll​(java.util.Collection<? extends SOURCE> sources,
                                                  java.util.Collection<OPTION> options)
        Converts a Collection of SOURCE objects into a List of TARGET objects using provided as Collection Options.
        Parameters:
        sources - - the source objects
        options - - the array of convert options
        Returns:
        the List of TARGET objects
        Throws:
        ConversionException - when an error occurs during the conversion process
      • getTargetInstance

        TARGET getTargetInstance​(SOURCE source)
        Getting target instance of source object
        Parameters:
        source - - the source object
        Returns:
        the TARGET object
      • getDefaultOptions

        java.util.Collection<OPTION> getDefaultOptions()
        Getting default options
        Returns:
        the Collection of Options