Package org.mapstruct.ap.internal.model
Class IterableCreation
java.lang.Object
org.mapstruct.ap.internal.writer.FreeMarkerWritable
org.mapstruct.ap.internal.model.common.ModelElement
org.mapstruct.ap.internal.model.IterableCreation
- All Implemented Interfaces:
Writable
Model element that can be used to create a type of
Iterable or Map. If an implementation
type is used and the target type has a constructor with int as parameter and the source parameter is of
Collection, Map or Array type then MapStruct will use that constructor
with the size / length from the source parameter.- Author:
- Filip Hrisafov
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.writer.Writable
Writable.Context -
Method Summary
Modifier and TypeMethodDescriptionstatic IterableCreationcreate(NormalTypeMappingMethod mappingMethod, Parameter sourceParameter) Returns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.booleanbooleanbooleanMethods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateName, getTemplateNameForClass, write
-
Method Details
-
create
public static IterableCreation create(NormalTypeMappingMethod mappingMethod, Parameter sourceParameter) -
getResultType
-
getSourceParameter
-
getFactoryMethod
-
isCanUseSize
public boolean isCanUseSize() -
isLoadFactorAdjustment
public boolean isLoadFactorAdjustment() -
getImportTypes
Description copied from class:ModelElementReturns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.- Specified by:
getImportTypesin classModelElement- Returns:
- A set with type referenced by this model element. Must not be
null.
-
getEnumSetElementType
-
isEnumSet
public boolean isEnumSet()
-