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 ofIterableorMap. If an implementation type is used and the target type has a constructor withintas parameter and the source parameter is ofCollection,MaporArraytype then MapStruct will use that constructor with thesize/lengthfrom 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 IterableCreationcreate(NormalTypeMappingMethod mappingMethod, Parameter sourceParameter)TypegetEnumSetElementType()MethodReferencegetFactoryMethod()Set<Type>getImportTypes()Returns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.TypegetResultType()ParametergetSourceParameter()booleanisCanUseSize()booleanisEnumSet()booleanisLoadFactorAdjustment()-
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: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
public Type getEnumSetElementType()
-
isEnumSet
public boolean isEnumSet()
-
-