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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDecorator.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
-
-
Field Summary
Fields Modifier and Type Field Description private TypedecoratorTypeprivate TypemapperType
-
Constructor Summary
Constructors Modifier Constructor Description privateDecorator(TypeFactory typeFactory, java.lang.String packageName, java.lang.String name, Type decoratorType, Type mapperType, java.util.List<MappingMethod> methods, Options options, VersionInformation versionInformation, boolean suppressGeneratorTimestamp, Accessibility accessibility, java.util.SortedSet<Type> extraImports, DecoratorConstructor decoratorConstructor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.SortedSet<Type>getImportTypes()Returns a set containing thoseTypes referenced by this model element for which an import statement needs to be declared.TypegetMapperType()protected java.lang.StringgetTemplateName()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
-
-
-
-
Constructor Detail
-
Decorator
private Decorator(TypeFactory typeFactory, java.lang.String packageName, java.lang.String name, Type decoratorType, Type mapperType, java.util.List<MappingMethod> methods, Options options, VersionInformation versionInformation, boolean suppressGeneratorTimestamp, Accessibility accessibility, java.util.SortedSet<Type> extraImports, DecoratorConstructor decoratorConstructor)
-
-
Method Detail
-
getImportTypes
public java.util.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.- Overrides:
getImportTypesin classGeneratedType- Returns:
- A set with type referenced by this model element. Must not be
null.
-
getTemplateName
protected java.lang.String getTemplateName()
Description copied from class:FreeMarkerWritableReturns 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:
getTemplateNamein classFreeMarkerWritable- Returns:
- the name of the template. Must not be
null.
-
getMapperType
public Type getMapperType()
-
-