Class IterableCreation

All Implemented Interfaces:
Writable

public class IterableCreation extends ModelElement
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
  • Method Details

    • 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 those Types referenced by this model element for which an import statement needs to be declared.
      Specified by:
      getImportTypes in class ModelElement
      Returns:
      A set with type referenced by this model element. Must not be null.
    • getEnumSetElementType

      public Type getEnumSetElementType()
    • isEnumSet

      public boolean isEnumSet()