Package org.mapstruct.ap.internal.model
Class StreamMappingMethod
- 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
-
- org.mapstruct.ap.internal.model.StreamMappingMethod
-
- All Implemented Interfaces:
Writable
public class StreamMappingMethod extends ContainerMappingMethod
AMappingMethodimplemented by aMapperclass which maps one iterable or array type to Stream. The collection elements are mapped either by aTypeConversionor another mapping method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStreamMappingMethod.Builder-
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.writer.Writable
Writable.Context
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<Type>helperImports
-
Constructor Summary
Constructors Modifier Constructor Description privateStreamMappingMethod(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, java.util.Set<Type> helperImports)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static TypegetElementType(Type parameterType)java.util.Set<Type>getImportTypes()Returns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.TypegetResultElementType()TypegetSourceElementType()-
Methods inherited from class org.mapstruct.ap.internal.model.ContainerMappingMethod
equals, getElementAssignment, getIndex1Name, getIndex2Name, getIterableCreation, getLoopVariableName, getSourceParameter, hashCode
-
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
-
helperImports
private final java.util.Set<Type> helperImports
-
-
Constructor Detail
-
StreamMappingMethod
private StreamMappingMethod(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, java.util.Set<Type> helperImports)
-
-
Method Detail
-
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 classContainerMappingMethod- Returns:
- A set with type referenced by this model element. Must not be
null.
-
getSourceElementType
public Type getSourceElementType()
-
getResultElementType
public Type getResultElementType()
- Specified by:
getResultElementTypein classContainerMappingMethod
-
-