Package org.mapstruct.ap.internal.model
Interface MappingBuilderContext.MappingResolver
-
- All Known Implementing Classes:
MappingResolverImpl
- Enclosing class:
- MappingBuilderContext
public static interface MappingBuilderContext.MappingResolver
Resolves the most suitable way for mapping an element (property, iterable element etc.) from source to target. There are 2 basic types of mappings:- conversions
- methods
- referenced mapping methods, these are methods implemented (or referenced) by the user. Sometimes indicated with the 'uses' in the mapping annotations or part of the abstract mapper class
- generated mapping methods (by means of MapStruct)
- built in methods
- Author:
- Sjaak Derksen
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Assignment
getTargetAssignment(Method mappingMethod, ForgedMethodHistory description, Type targetType, FormattingParameters formattingParameters, SelectionCriteria criteria, SourceRHS sourceRHS, AnnotationMirror positionHint, Supplier<Assignment> forger)
returns a parameter assignmentSet<Field>
getUsedSupportedFields()
Set<SupportingMappingMethod>
getUsedSupportedMappings()
-
-
-
Method Detail
-
getTargetAssignment
Assignment getTargetAssignment(Method mappingMethod, ForgedMethodHistory description, Type targetType, FormattingParameters formattingParameters, SelectionCriteria criteria, SourceRHS sourceRHS, AnnotationMirror positionHint, Supplier<Assignment> forger)
returns a parameter assignment- Parameters:
mappingMethod
- target mapping methoddescription
- the description sourcetargetType
- return type to matchformattingParameters
- used for formatting dates and numberscriteria
- parameters criteria in the selection processsourceRHS
- source informationpositionHint
- the mirror for reporting problemsforger
- the supplier of the callback method to forge a method- Returns:
- an assignment to a method parameter, which can either be:
- MethodReference
- TypeConversion
- SourceRHS Assignment (empty TargetAssignment)
- null, no assignment found
-
getUsedSupportedMappings
Set<SupportingMappingMethod> getUsedSupportedMappings()
-
-