Package org.mapstruct.ap.internal.model
Class Decorator
- java.lang.Object
-
- org.mapstruct.ap.internal.writer.FreeMarkerWritable
-
- org.mapstruct.ap.internal.model.common.ModelElement
-
- org.mapstruct.ap.internal.model.GeneratedType
-
- org.mapstruct.ap.internal.model.Decorator
-
- All Implemented Interfaces:
Writable
public class Decorator extends GeneratedType
Represents a decorator applied to a generated mapper type.- Author:
- Gunnar Morling
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Decorator.Builder
-
Nested classes/interfaces inherited from class org.mapstruct.ap.internal.model.GeneratedType
GeneratedType.GeneratedTypeBuilder<T extends GeneratedType.GeneratedTypeBuilder>
-
Nested classes/interfaces inherited from interface org.mapstruct.ap.internal.writer.Writable
Writable.Context
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SortedSet<Type>
getImportTypes()
Returns a set containing thoseType
s referenced by this model element for which an import statement needs to be declared.Type
getMapperType()
protected String
getTemplateName()
Returns the name of the template to be used for a specific writable type.-
Methods inherited from class org.mapstruct.ap.internal.model.GeneratedType
addAnnotation, addIfImportRequired, getAccessibility, getAnnotations, getConstructor, getFields, getImportTypeNames, getMapperDefinitionType, getMethods, getName, getPackageName, getVersionInformation, hasPackageName, isGeneratedTypeAvailable, isSuppressGeneratorTimestamp, isSuppressGeneratorVersionComment, removeConstructor, setConstructor, setFields
-
Methods inherited from class org.mapstruct.ap.internal.writer.FreeMarkerWritable
getTemplateNameForClass, write
-
-
-
-
Method Detail
-
getImportTypes
public SortedSet<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.- Overrides:
getImportTypes
in classGeneratedType
- Returns:
- A set with type referenced by this model element. Must not be
null
.
-
getTemplateName
protected String getTemplateName()
Description copied from class:FreeMarkerWritable
Returns the name of the template to be used for a specific writable type. By default,FreeMarkerWritable.getTemplateNameForClass(Class)
is called withgetClass()
, but this can be customized by overriding this method if required.- Overrides:
getTemplateName
in classFreeMarkerWritable
- Returns:
- the name of the template. Must not be
null
.
-
getMapperType
public Type getMapperType()
-
-