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
public class IterableCreation extends ModelElement
Model element that can be used to create a type ofIterable
orMap
. If an implementation type is used and the target type has a constructor withint
as parameter and the source parameter is ofCollection
,Map
orArray
type then MapStruct will use that constructor with thesize
/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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IterableCreation
create(NormalTypeMappingMethod mappingMethod, Parameter sourceParameter)
Type
getEnumSetElementType()
MethodReference
getFactoryMethod()
Set<Type>
getImportTypes()
Returns a set containing thoseType
s referenced by this model element for which an import statement needs to be declared.Type
getResultType()
Parameter
getSourceParameter()
boolean
isCanUseSize()
boolean
isEnumSet()
boolean
isLoadFactorAdjustment()
-
Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateName, getTemplateNameForClass, write
-
-
-
-
Method Detail
-
create
public static IterableCreation create(NormalTypeMappingMethod mappingMethod, Parameter sourceParameter)
-
getResultType
public Type getResultType()
-
getSourceParameter
public Parameter getSourceParameter()
-
getFactoryMethod
public MethodReference getFactoryMethod()
-
isCanUseSize
public boolean isCanUseSize()
-
isLoadFactorAdjustment
public boolean isLoadFactorAdjustment()
-
getImportTypes
public Set<Type> getImportTypes()
Description copied from class:ModelElement
Returns a set containing thoseType
s referenced by this model element for which an import statement needs to be declared.- Specified by:
getImportTypes
in classModelElement
- Returns:
- A set with type referenced by this model element. Must not be
null
.
-
getEnumSetElementType
public Type getEnumSetElementType()
-
isEnumSet
public boolean isEnumSet()
-
-