Class GeneratedType

  • All Implemented Interfaces:
    Writable
    Direct Known Subclasses:
    Decorator, Mapper

    public abstract class GeneratedType
    extends ModelElement
    A type generated by MapStruct, e.g. representing a mapper type.
    • Field Detail

      • JAVA_LANG_PACKAGE

        private static final java.lang.String JAVA_LANG_PACKAGE
        See Also:
        Constant Field Values
      • packageName

        private final java.lang.String packageName
      • name

        private final java.lang.String name
      • mapperDefinitionType

        private final Type mapperDefinitionType
      • annotations

        private final java.util.List<Annotation> annotations
      • extraImportedTypes

        private final java.util.SortedSet<Type> extraImportedTypes
      • suppressGeneratorTimestamp

        private final boolean suppressGeneratorTimestamp
      • suppressGeneratorVersionComment

        private final boolean suppressGeneratorVersionComment
      • fields

        private java.util.List<Field> fields
      • generatedType

        private final Type generatedType
        Type representing the @Generated annotation
      • generatedTypeAvailable

        private final boolean generatedTypeAvailable
    • Constructor Detail

    • Method Detail

      • getPackageName

        public java.lang.String getPackageName()
      • hasPackageName

        public boolean hasPackageName()
      • getName

        public java.lang.String getName()
      • getMapperDefinitionType

        public Type getMapperDefinitionType()
      • getAnnotations

        public java.util.List<Annotation> getAnnotations()
      • addAnnotation

        public void addAnnotation​(Annotation annotation)
      • getFields

        public java.util.List<Field> getFields()
      • setFields

        public void setFields​(java.util.List<Field> fields)
      • isSuppressGeneratorTimestamp

        public boolean isSuppressGeneratorTimestamp()
      • isSuppressGeneratorVersionComment

        public boolean isSuppressGeneratorVersionComment()
      • isGeneratedTypeAvailable

        public boolean isGeneratedTypeAvailable()
      • setConstructor

        public void setConstructor​(Constructor constructor)
      • getImportTypes

        public java.util.SortedSet<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.
      • getImportTypeNames

        public java.util.SortedSet<java.lang.String> getImportTypeNames()
      • removeConstructor

        public void removeConstructor()
      • addIfImportRequired

        protected void addIfImportRequired​(java.util.Collection<Type> collection,
                                           Type typeToAdd)
      • needsImportDeclaration

        private boolean needsImportDeclaration​(Type typeToAdd)