Package org.mapstruct.ap.internal.model
Class MapMappingMethod
- java.lang.Object
-
- org.mapstruct.ap.internal.writer.FreeMarkerWritable
-
- org.mapstruct.ap.internal.model.common.ModelElement
-
- org.mapstruct.ap.internal.model.MappingMethod
-
- org.mapstruct.ap.internal.model.NormalTypeMappingMethod
-
- org.mapstruct.ap.internal.model.MapMappingMethod
-
- All Implemented Interfaces:
Writable
public class MapMappingMethod extends NormalTypeMappingMethod
AMappingMethodimplemented by aMapperclass which maps oneMaptype to another. Keys and values are mapped either by aTypeConversionor another mapping method if required.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMapMappingMethod.Builder-
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.writer.Writable
Writable.Context
-
-
Field Summary
Fields Modifier and Type Field Description private IterableCreationiterableCreationprivate AssignmentkeyAssignmentprivate AssignmentvalueAssignment
-
Constructor Summary
Constructors Modifier Constructor Description privateMapMappingMethod(Method method, java.util.Collection<java.lang.String> existingVariableNames, Assignment keyAssignment, Assignment valueAssignment, MethodReference factoryMethod, boolean mapNullToDefault, java.util.List<LifecycleCallbackMethodReference> beforeMappingReferences, java.util.List<LifecycleCallbackMethodReference> afterMappingReferences)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetEntryVariableName()java.util.Set<Type>getImportTypes()Returns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.IterableCreationgetIterableCreation()AssignmentgetKeyAssignment()java.lang.StringgetKeyVariableName()java.util.List<Type>getResultElementTypes()java.util.List<Type>getSourceElementTypes()ParametergetSourceParameter()AssignmentgetValueAssignment()java.lang.StringgetValueVariableName()-
Methods inherited from class org.mapstruct.ap.internal.model.NormalTypeMappingMethod
equals, getFactoryMethod, hashCode, isMapNullToDefault, isOverridden
-
Methods inherited from class org.mapstruct.ap.internal.model.MappingMethod
getAccessibility, getAfterMappingReferences, getBeforeMappingReferencesWithMappingTarget, getBeforeMappingReferencesWithoutMappingTarget, getName, getParameterNames, getParameters, getResultName, getResultType, getReturnType, getSourceParameters, getThrownTypes, isExistingInstanceMapping, isStatic, toString
-
Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateName, getTemplateNameForClass, write
-
-
-
-
Field Detail
-
keyAssignment
private final Assignment keyAssignment
-
valueAssignment
private final Assignment valueAssignment
-
iterableCreation
private IterableCreation iterableCreation
-
-
Constructor Detail
-
MapMappingMethod
private MapMappingMethod(Method method, java.util.Collection<java.lang.String> existingVariableNames, Assignment keyAssignment, Assignment valueAssignment, MethodReference factoryMethod, boolean mapNullToDefault, java.util.List<LifecycleCallbackMethodReference> beforeMappingReferences, java.util.List<LifecycleCallbackMethodReference> afterMappingReferences)
-
-
Method Detail
-
getSourceParameter
public Parameter getSourceParameter()
-
getSourceElementTypes
public java.util.List<Type> getSourceElementTypes()
-
getResultElementTypes
public java.util.List<Type> getResultElementTypes()
-
getKeyAssignment
public Assignment getKeyAssignment()
-
getValueAssignment
public Assignment getValueAssignment()
-
getImportTypes
public java.util.Set<Type> getImportTypes()
Description copied from class:ModelElementReturns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.- Overrides:
getImportTypesin classNormalTypeMappingMethod- Returns:
- A set with type referenced by this model element. Must not be
null.
-
getKeyVariableName
public java.lang.String getKeyVariableName()
-
getValueVariableName
public java.lang.String getValueVariableName()
-
getEntryVariableName
public java.lang.String getEntryVariableName()
-
getIterableCreation
public IterableCreation getIterableCreation()
-
-