Interface MapperManager

All Superinterfaces:
Mappers, RuntimeType.Api<MappersConfig>

@Deprecated(forRemoval=true, since="4.2.0") public interface MapperManager extends Mappers
Deprecated, for removal: This API element is subject to removal in a future version.
use Mappers instead
Mapper manager of all configured mappers.

To map a source to target, you can use either of the map methods defined in this interface, as they make sure that the mapping exists in either space.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    use Mappers.builder() instead
    Deprecated, for removal: This API element is subject to removal in a future version.
    use Mappers.create() instead
    Deprecated, for removal: This API element is subject to removal in a future version.
    static void
    Deprecated, for removal: This API element is subject to removal in a future version.
    <SOURCE, TARGET>
    TARGET
    map(SOURCE source, GenericType<SOURCE> sourceType, GenericType<TARGET> targetType, String... qualifiers)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Map from source to target.
    <SOURCE, TARGET>
    TARGET
    map(SOURCE source, Class<SOURCE> sourceType, Class<TARGET> targetType, String... qualifiers)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Map from source to target.
    <SOURCE, TARGET>
    Optional<Mapper<SOURCE,TARGET>>
    mapper(GenericType<SOURCE> sourceType, GenericType<TARGET> targetType, String... qualifiers)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Obtain a mapper for the provided types and qualifiers.

    Methods inherited from interface io.helidon.builder.api.RuntimeType.Api

    prototype
  • Method Details

    • global

      @Deprecated(forRemoval=true, since="4.2.0") static MapperManager global()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use Services.get(Class) - i.e. Services.get(Mappers.class), or use your registry instance in a similar way
      Get an instance of the configured global manager. If none is explicitly set, an instance is created using discovered and built-in mappers.
      Returns:
      global mapper manager
    • global

      @Deprecated(forRemoval=true, since="4.2.0") static void global(MapperManager manager)
      Deprecated, for removal: This API element is subject to removal in a future version.
      use Services.set(Class, Object[]) - i.e. Services.get(Mappers.class, myMappers) before the program starts (must be configured before it is first used)
      Configure a new global mapper manager.
      Parameters:
      manager - mapper manager to use
    • builder

      @Deprecated(forRemoval=true, since="4.2.0") static MapperManager.Builder builder()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use Mappers.builder() instead
      Create a fluent API builder to create a customized mapper manager.
      Returns:
      a new builder
    • create

      @Deprecated(forRemoval=true, since="4.2.0") static MapperManager create()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use Mappers.create() instead
      Create a mapper manager using only Java Service loader loaded MapperProviders.
      Returns:
      create a new mapper manager from service loader
    • map

      <SOURCE, TARGET> TARGET map(SOURCE source, GenericType<SOURCE> sourceType, GenericType<TARGET> targetType, String... qualifiers) throws MapperException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Map from source to target.
      Specified by:
      map in interface Mappers
      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)
      qualifiers - qualifiers of the usage (such as http-headers, http, most specific one first)
      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, String... qualifiers) throws MapperException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Map from source to target.
      Specified by:
      map in interface Mappers
      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)
      qualifiers - qualifiers of the usage (such as http-headers, http, most specific one first)
      Returns:
      result of the mapping
      Throws:
      MapperException - in case the mapper was not found or failed
    • mapper

      <SOURCE, TARGET> Optional<Mapper<SOURCE,TARGET>> mapper(GenericType<SOURCE> sourceType, GenericType<TARGET> targetType, String... qualifiers)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Obtain a mapper for the provided types and qualifiers.
      Specified by:
      mapper in interface Mappers
      Type Parameters:
      SOURCE - source type
      TARGET - target type
      Parameters:
      sourceType - type to map from
      targetType - type to map to
      qualifiers - qualifiers of the mapper
      Returns:
      mapper if found