Package org.mapstruct.ap.internal.model
Class Mapper
- 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.Mapper
-
- All Implemented Interfaces:
Writable
public class Mapper extends GeneratedType
Represents a type implementing a mapper interface (annotated with@Mapper). This is the root object of the mapper model.- Author:
- Gunnar Morling
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMapper.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 Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DecoratorgetDecorator()static StringgetFlatName(TypeElement element)Returns the same asClass.getName()but without the package declaration.JavadocgetJavadoc()protected StringgetTemplateName()Returns the name of the template to be used for a specific writable type.booleanhasCustomImplementation()voidremoveDecorator()-
Methods inherited from class org.mapstruct.ap.internal.model.GeneratedType
addAnnotation, addIfImportRequired, getAccessibility, getAnnotations, getConstructor, getFields, getImportTypeNames, getImportTypes, 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
-
getDecorator
public Decorator getDecorator()
-
removeDecorator
public void removeDecorator()
-
hasCustomImplementation
public boolean hasCustomImplementation()
-
getJavadoc
public Javadoc getJavadoc()
- Overrides:
getJavadocin classGeneratedType
-
getTemplateName
protected 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.
-
getFlatName
public static String getFlatName(TypeElement element)
Returns the same asClass.getName()but without the package declaration.- Parameters:
element- the element that should be flattened- Returns:
- the flat name for the type element
-
-