-
- All Known Implementing Classes:
DbClientMapperProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface MapperProvider
Java Service loader service to get mappers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <SOURCE,TARGET>
Optional<Mapper<?,?>>mapper(GenericType<SOURCE> sourceType, GenericType<TARGET> targetType)
Find a mapper that is capable of mapping from source to target types.<SOURCE,TARGET>
Optional<Mapper<?,?>>mapper(Class<SOURCE> sourceClass, Class<TARGET> targetClass)
Find a mapper that is capable of mapping from source to target classes.
-
-
-
Method Detail
-
mapper
<SOURCE,TARGET> Optional<Mapper<?,?>> mapper(Class<SOURCE> sourceClass, Class<TARGET> targetClass)
Find a mapper that is capable of mapping from source to target classes.- Type Parameters:
SOURCE
- type of the sourceTARGET
- type of the target- Parameters:
sourceClass
- class of the sourcetargetClass
- class of the target- Returns:
- a mapper that is capable of mapping (or converting) sources to targets
-
mapper
default <SOURCE,TARGET> Optional<Mapper<?,?>> mapper(GenericType<SOURCE> sourceType, GenericType<TARGET> targetType)
Find a mapper that is capable of mapping from source to target types. This method supports mapping to/from types that contain generics.- Type Parameters:
SOURCE
- type of the sourceTARGET
- type of the target- Parameters:
sourceType
- generic type of the sourcetargetType
- generic type of the target- Returns:
- a mapper that is capable of mapping (or converting) sources to targets
-
-