Interface ConfigurableCustomConverter

  • All Superinterfaces:
    CustomConverter
    All Known Implementing Classes:
    DozerConverter

    public interface ConfigurableCustomConverter
    extends CustomConverter
    Public custom converter interface.

    In the Dozer mapping file(s), you can add some XML to tell Dozer to use a custom converter for certain class A and class B types. When a custom converter is specified for a class A and class B combination, Dozer will invoke the custom converter to perform the data mapping instead of the standard mapping logic.

    This interface also gives you the opportunity to send a configuration parameter to it.

    https://dozermapper.github.io/gitbook/documentation/customconverter.html

    • Method Detail

      • setParameter

        void setParameter​(String parameter)
        Setter for converter static parameter. Method is guaranteed to be called before each mapping call.

        Dozer may reuse custom converter instances across different threads. The implementing class is responsible for storing the parameter in a thread-safe manner, for example using a ThreadLocal.

        Parameters:
        parameter - - converter instance, which is injected via custom-converter-param attribute