Class MappingResolverImpl
- java.lang.Object
-
- org.mapstruct.ap.internal.processor.creation.MappingResolverImpl
-
- All Implemented Interfaces:
MappingBuilderContext.MappingResolver
public class MappingResolverImpl extends Object implements MappingBuilderContext.MappingResolver
The one and only implementation ofMappingBuilderContext.MappingResolver
. The class has been split into an interface an implementation for the sake of avoiding package dependencies. Specifically, this implementation refers to classes which should not be exposed to themodel
package.- Author:
- Sjaak Derksen
-
-
Constructor Summary
Constructors Constructor Description MappingResolverImpl(FormattingMessager messager, ElementUtils elementUtils, TypeUtils typeUtils, TypeFactory typeFactory, List<Method> sourceModel, List<MapperReference> mapperReferences, boolean verboseLogging)
-
Method Summary
All Methods Instance Methods Concrete 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()
-
-
-
Constructor Detail
-
MappingResolverImpl
public MappingResolverImpl(FormattingMessager messager, ElementUtils elementUtils, TypeUtils typeUtils, TypeFactory typeFactory, List<Method> sourceModel, List<MapperReference> mapperReferences, boolean verboseLogging)
-
-
Method Detail
-
getTargetAssignment
public Assignment getTargetAssignment(Method mappingMethod, ForgedMethodHistory description, Type targetType, FormattingParameters formattingParameters, SelectionCriteria criteria, SourceRHS sourceRHS, AnnotationMirror positionHint, Supplier<Assignment> forger)
Description copied from interface:MappingBuilderContext.MappingResolver
returns a parameter assignment- Specified by:
getTargetAssignment
in interfaceMappingBuilderContext.MappingResolver
- 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
public Set<SupportingMappingMethod> getUsedSupportedMappings()
- Specified by:
getUsedSupportedMappings
in interfaceMappingBuilderContext.MappingResolver
-
getUsedSupportedFields
public Set<Field> getUsedSupportedFields()
- Specified by:
getUsedSupportedFields
in interfaceMappingBuilderContext.MappingResolver
-
-