Package org.mapstruct.ap.internal.model
Class ContainerMappingMethod
- 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.ContainerMappingMethod
-
- All Implemented Interfaces:
Writable
- Direct Known Subclasses:
IterableMappingMethod,StreamMappingMethod
public abstract class ContainerMappingMethod extends NormalTypeMappingMethod
AMappingMethodimplemented by aMapperclass which does mapping of generic types. For example Iterable or Stream. The generic elements are mapped either by aTypeConversionor another mapping method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.writer.Writable
Writable.Context
-
-
Field Summary
Fields Modifier and Type Field Description private AssignmentelementAssignmentprivate java.lang.Stringindex1Nameprivate java.lang.Stringindex2Nameprivate IterableCreationiterableCreationprivate java.lang.StringloopVariableNameprivate SelectionParametersselectionParameters
-
Constructor Summary
Constructors Constructor Description ContainerMappingMethod(Method method, java.util.Collection<java.lang.String> existingVariables, Assignment parameterAssignment, MethodReference factoryMethod, boolean mapNullToDefault, java.lang.String loopVariableName, java.util.List<LifecycleCallbackMethodReference> beforeMappingReferences, java.util.List<LifecycleCallbackMethodReference> afterMappingReferences, SelectionParameters selectionParameters)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)AssignmentgetElementAssignment()java.util.Set<Type>getImportTypes()Returns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.java.lang.StringgetIndex1Name()java.lang.StringgetIndex2Name()IterableCreationgetIterableCreation()java.lang.StringgetLoopVariableName()abstract TypegetResultElementType()ParametergetSourceParameter()inthashCode()-
Methods inherited from class org.mapstruct.ap.internal.model.NormalTypeMappingMethod
getFactoryMethod, 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
-
elementAssignment
private final Assignment elementAssignment
-
loopVariableName
private final java.lang.String loopVariableName
-
selectionParameters
private final SelectionParameters selectionParameters
-
index1Name
private final java.lang.String index1Name
-
index2Name
private final java.lang.String index2Name
-
iterableCreation
private IterableCreation iterableCreation
-
-
Constructor Detail
-
ContainerMappingMethod
ContainerMappingMethod(Method method, java.util.Collection<java.lang.String> existingVariables, Assignment parameterAssignment, MethodReference factoryMethod, boolean mapNullToDefault, java.lang.String loopVariableName, java.util.List<LifecycleCallbackMethodReference> beforeMappingReferences, java.util.List<LifecycleCallbackMethodReference> afterMappingReferences, SelectionParameters selectionParameters)
-
-
Method Detail
-
getSourceParameter
public Parameter getSourceParameter()
-
getIterableCreation
public IterableCreation getIterableCreation()
-
getElementAssignment
public Assignment getElementAssignment()
-
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.
-
getLoopVariableName
public java.lang.String getLoopVariableName()
-
getResultElementType
public abstract Type getResultElementType()
-
getIndex1Name
public java.lang.String getIndex1Name()
-
getIndex2Name
public java.lang.String getIndex2Name()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classNormalTypeMappingMethod
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classNormalTypeMappingMethod
-
-