Class MappingProcessor

  • All Implemented Interfaces:
    Mapper

    public class MappingProcessor
    extends Object
    implements Mapper
    Internal Mapping Engine. Not intended for direct use by Application code. This class does most of the heavy lifting and is very recursive in nature.

    This class is not threadsafe and is instantiated for each new mapping request.

    • Method Detail

      • map

        public <T> T map​(Object srcObj,
                         Class<T> destClass)
        Description copied from interface: Mapper
        Constructs new instance of destinationClass and performs mapping between from source
        Specified by:
        map in interface Mapper
        Type Parameters:
        T - type to convert to
        Parameters:
        srcObj - object to convert from
        destClass - type to convert to
        Returns:
        mapped object
      • map

        public <T> T map​(Object srcObj,
                         Class<T> destClass,
                         String mapId)
        Description copied from interface: Mapper
        Constructs new instance of destinationClass and performs mapping between from source
        Specified by:
        map in interface Mapper
        Type Parameters:
        T - type to convert to
        Parameters:
        srcObj - object to convert from
        destClass - type to convert to
        mapId - id in configuration for mapping
        Returns:
        mapped object
      • map

        public void map​(Object srcObj,
                        Object destObj)
        Description copied from interface: Mapper
        Performs mapping between source and destination objects
        Specified by:
        map in interface Mapper
        Parameters:
        srcObj - object to convert from
        destObj - object to convert to
      • map

        public void map​(Object srcObj,
                        Object destObj,
                        String mapId)
        Description copied from interface: Mapper
        Performs mapping between source and destination objects
        Specified by:
        map in interface Mapper
        Parameters:
        srcObj - object to convert from
        destObj - object to convert to
        mapId - id in configuration for mapping
      • getMapperModelContext

        public MapperModelContext getMapperModelContext()
        Only required due to type coupling of MappingProcessor and Mapper - needs re-think
        Specified by:
        getMapperModelContext in interface Mapper
        Returns:
        nothing