Interface MapperManager

    • Method Detail

      • builder

        static MapperManager.Builder builder()
        Create a fluent API builder to create a customized mapper manager.
        Returns:
        a new builder
      • create

        static MapperManager create()
        Create a mapper manager using only Java Service loader loaded MapperProviders.
        Returns:
        create a new mapper manager from service loader
      • builder

        static MapperManager.Builder builder​(HelidonServiceLoader<MapperProvider> serviceLoader)
        Create a fluent API builder to create a customized mapper manager based on the provided Helidon Service loader.
        Parameters:
        serviceLoader - fully configured service loader
        Returns:
        a new builder
      • map

        <SOURCE,​TARGET> TARGET map​(SOURCE source,
                                         GenericType<SOURCE> sourceType,
                                         GenericType<TARGET> targetType)
                                  throws MapperException
        Map from source to target.
        Type Parameters:
        SOURCE - type of the source
        TARGET - type of the target
        Parameters:
        source - object to map
        sourceType - type of the source object (to locate the mapper)
        targetType - type of the target object (to locate the mapper)
        Returns:
        result of the mapping
        Throws:
        MapperException - in case the mapper was not found or failed
      • map

        <SOURCE,​TARGET> TARGET map​(SOURCE source,
                                         Class<SOURCE> sourceType,
                                         Class<TARGET> targetType)
                                  throws MapperException
        Map from source to target.
        Type Parameters:
        SOURCE - type of the source
        TARGET - type of the target
        Parameters:
        source - object to map
        sourceType - class of the source object (to locate the mapper)
        targetType - class of the target object (to locate the mapper)
        Returns:
        result of the mapping
        Throws:
        MapperException - in case the mapper was not found or failed