Class MappingResolverImpl
java.lang.Object
org.mapstruct.ap.internal.processor.creation.MappingResolverImpl
- All Implemented Interfaces:
MappingBuilderContext.MappingResolver
The one and only implementation of
MappingBuilderContext.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 the model package.- Author:
- Sjaak Derksen
-
Constructor Summary
ConstructorsConstructorDescriptionMappingResolverImpl(FormattingMessager messager, ElementUtils elementUtils, TypeUtils typeUtils, TypeFactory typeFactory, List<Method> sourceModel, List<MapperReference> mapperReferences, boolean verboseLogging) -
Method Summary
Modifier and TypeMethodDescriptiongetTargetAssignment(Method mappingMethod, ForgedMethodHistory description, Type targetType, FormattingParameters formattingParameters, SelectionCriteria criteria, SourceRHS sourceRHS, AnnotationMirror positionHint, Supplier<Assignment> forger) returns a parameter assignment
-
Constructor Details
-
MappingResolverImpl
public MappingResolverImpl(FormattingMessager messager, ElementUtils elementUtils, TypeUtils typeUtils, TypeFactory typeFactory, List<Method> sourceModel, List<MapperReference> mapperReferences, boolean verboseLogging)
-
-
Method Details
-
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.MappingResolverreturns a parameter assignment- Specified by:
getTargetAssignmentin 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
- Specified by:
getUsedSupportedMappingsin interfaceMappingBuilderContext.MappingResolver
-
getUsedSupportedFields
- Specified by:
getUsedSupportedFieldsin interfaceMappingBuilderContext.MappingResolver
-