Package org.mapstruct.ap.internal.model
Class GeneratedType
- java.lang.Object
-
- org.mapstruct.ap.internal.writer.FreeMarkerWritable
-
- org.mapstruct.ap.internal.model.common.ModelElement
-
- org.mapstruct.ap.internal.model.GeneratedType
-
- All Implemented Interfaces:
Writable
public abstract class GeneratedType extends ModelElement
A type generated by MapStruct, e.g. representing a mapper type.- Author:
- Gunnar Morling
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classGeneratedType.GeneratedTypeBuilder<T extends GeneratedType.GeneratedTypeBuilder>-
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.writer.Writable
Writable.Context
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGeneratedType(TypeFactory typeFactory, String packageName, String name, Type mapperDefinitionType, List<MappingMethod> methods, List<Field> fields, Options options, VersionInformation versionInformation, boolean suppressGeneratorTimestamp, Accessibility accessibility, SortedSet<Type> extraImportedTypes, Constructor constructor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAnnotation(Annotation annotation)protected voidaddIfImportRequired(Collection<Type> collection, Type typeToAdd)AccessibilitygetAccessibility()List<Annotation>getAnnotations()ConstructorgetConstructor()List<Field>getFields()SortedSet<String>getImportTypeNames()SortedSet<Type>getImportTypes()Returns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.TypegetMapperDefinitionType()List<MappingMethod>getMethods()StringgetName()StringgetPackageName()VersionInformationgetVersionInformation()booleanhasPackageName()booleanisGeneratedTypeAvailable()booleanisSuppressGeneratorTimestamp()booleanisSuppressGeneratorVersionComment()voidremoveConstructor()voidsetConstructor(Constructor constructor)voidsetFields(List<Field> fields)-
Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateName, getTemplateNameForClass, write
-
-
-
-
Constructor Detail
-
GeneratedType
protected GeneratedType(TypeFactory typeFactory, String packageName, String name, Type mapperDefinitionType, List<MappingMethod> methods, List<Field> fields, Options options, VersionInformation versionInformation, boolean suppressGeneratorTimestamp, Accessibility accessibility, SortedSet<Type> extraImportedTypes, Constructor constructor)
-
-
Method Detail
-
getPackageName
public String getPackageName()
-
hasPackageName
public boolean hasPackageName()
-
getName
public String getName()
-
getMapperDefinitionType
public Type getMapperDefinitionType()
-
getAnnotations
public List<Annotation> getAnnotations()
-
addAnnotation
public void addAnnotation(Annotation annotation)
-
getMethods
public List<MappingMethod> getMethods()
-
isSuppressGeneratorTimestamp
public boolean isSuppressGeneratorTimestamp()
-
isSuppressGeneratorVersionComment
public boolean isSuppressGeneratorVersionComment()
-
isGeneratedTypeAvailable
public boolean isGeneratedTypeAvailable()
-
getVersionInformation
public VersionInformation getVersionInformation()
-
getAccessibility
public Accessibility getAccessibility()
-
setConstructor
public void setConstructor(Constructor constructor)
-
getImportTypes
public SortedSet<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.
-
getConstructor
public Constructor getConstructor()
-
removeConstructor
public void removeConstructor()
-
addIfImportRequired
protected void addIfImportRequired(Collection<Type> collection, Type typeToAdd)
-
-