- 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.
Java Service loader service to get mappers.
-
Method Summary
Modifier and TypeMethodDescriptionmapper
(GenericType<SOURCE> sourceType, GenericType<TARGET> targetType) Find a mapper that is capable of mapping from source to target types.Find a mapper that is capable of mapping from source to target classes.
-
Method Details
-
mapper
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
-