Class MapperManager.Builder

    • Method Detail

      • addMapper

        public <S,​T> MapperManager.Builder addMapper​(Mapper<S,​T> mapper,
                                                           Class<S> sourceType,
                                                           Class<T> targetType)
        Add a mapper to the list of mapper.
        Type Parameters:
        S - type of source
        T - type of target
        Parameters:
        mapper - the mapper to map source instances to target instances
        sourceType - class of the source instance
        targetType - class of the target instance
        Returns:
        updated builder instance
      • addMapper

        public <S,​T> MapperManager.Builder addMapper​(Mapper<S,​T> mapper,
                                                           Class<S> sourceType,
                                                           Class<T> targetType,
                                                           int priority)
        Add a mapper to the list of mapper with a custom priority.
        Type Parameters:
        S - type of source
        T - type of target
        Parameters:
        mapper - the mapper to map source instances to target instances
        sourceType - class of the source instance
        targetType - class of the target instance
        priority - order of the mapper usage
        Returns:
        updated builder instance
      • addMapper

        public <S,​T> MapperManager.Builder addMapper​(Mapper<S,​T> mapper,
                                                           GenericType<S> sourceType,
                                                           GenericType<T> targetType)
        Add a mapper to the list of mapper.
        Type Parameters:
        S - type of source
        T - type of target
        Parameters:
        mapper - the mapper to map source instances to target instances
        sourceType - generic type of the source instance
        targetType - generic type of the target instance
        Returns:
        updated builder instance
      • addMapper

        public <S,​T> MapperManager.Builder addMapper​(Mapper<S,​T> mapper,
                                                           GenericType<S> sourceType,
                                                           GenericType<T> targetType,
                                                           int priority)
        Add a mapper to the list of mapper with custom priority.
        Type Parameters:
        S - type of source
        T - type of target
        Parameters:
        mapper - the mapper to map source instances to target instances
        sourceType - generic type of the source instance
        targetType - generic type of the target instance
        priority - order of the mapper usage
        Returns:
        updated builder instance