Class VariableMapper

  • All Implemented Interfaces:
    com.github.dozermapper.core.ConfigurableCustomConverter, com.github.dozermapper.core.CustomConverter

    public class VariableMapper
    extends BaseConverter
    Used to map literal values (e.g. "ACME" or "ABC-123") to a field in the target object.
    • Constructor Detail

      • VariableMapper

        public VariableMapper()
    • Method Detail

      • convert

        public Object convert​(Object existingDestinationFieldValue,
                              Object sourceFieldValue,
                              Class<?> destinationClass,
                              Class<?> sourceClass)
      • getLiteral

        public String getLiteral()
        We need at least one field in this class so that we can use it as a source for Dozer transformations.