Class 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.
    • Field Detail

      • CLASS_NAME_PLACEHOLDER

        static final java.lang.String CLASS_NAME_PLACEHOLDER
        See Also:
        Constant Field Values
      • PACKAGE_NAME_PLACEHOLDER

        static final java.lang.String PACKAGE_NAME_PLACEHOLDER
        See Also:
        Constant Field Values
      • DEFAULT_IMPLEMENTATION_CLASS

        static final java.lang.String DEFAULT_IMPLEMENTATION_CLASS
        See Also:
        Constant Field Values
      • DEFAULT_IMPLEMENTATION_PACKAGE

        static final java.lang.String DEFAULT_IMPLEMENTATION_PACKAGE
        See Also:
        Constant Field Values
      • customPackage

        private final boolean customPackage
      • customImplName

        private final boolean customImplName
    • Constructor Detail

      • Mapper

        private Mapper​(TypeFactory typeFactory,
                       java.lang.String packageName,
                       java.lang.String name,
                       Type mapperDefinitionType,
                       boolean customPackage,
                       boolean customImplName,
                       java.util.List<MappingMethod> methods,
                       Options options,
                       VersionInformation versionInformation,
                       boolean suppressGeneratorTimestamp,
                       Accessibility accessibility,
                       java.util.List<Field> fields,
                       Constructor constructor,
                       Decorator decorator,
                       java.util.SortedSet<Type> extraImportedTypes)
    • Method Detail

      • getDecorator

        public Decorator getDecorator()
      • removeDecorator

        public void removeDecorator()
      • hasCustomImplementation

        public boolean hasCustomImplementation()
      • getFlatName

        public static java.lang.String getFlatName​(javax.lang.model.element.TypeElement element)
        Returns the same as Class.getName() but without the package declaration.
        Parameters:
        element - the element that should be flattened
        Returns:
        the flat name for the type element