Class DefaultMappingExclusionProvider

  • All Implemented Interfaces:
    MappingExclusionProvider

    class DefaultMappingExclusionProvider
    extends java.lang.Object
    implements MappingExclusionProvider
    The default implementation of the MappingExclusionProvider service provider interface. With the default implementation, MapStruct will not consider classes in the java and javax package as source / target for an automatic sub-mapping. The only exception is the Collection, Map and Stream types.
    Since:
    1.2
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.regex.Pattern JAVA_JAVAX_PACKAGE  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isExcluded​(javax.lang.model.element.TypeElement typeElement)
      Checks if MapStruct should not generate an automatic sub-mapping for the provided TypeElement, i.e.
      protected boolean isFullyQualifiedNameExcluded​(javax.lang.model.element.Name name)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • JAVA_JAVAX_PACKAGE

        private static final java.util.regex.Pattern JAVA_JAVAX_PACKAGE
    • Constructor Detail

      • DefaultMappingExclusionProvider

        DefaultMappingExclusionProvider()
    • Method Detail

      • isExcluded

        public boolean isExcluded​(javax.lang.model.element.TypeElement typeElement)
        Description copied from interface: MappingExclusionProvider
        Checks if MapStruct should not generate an automatic sub-mapping for the provided TypeElement, i.e. MapStruct will not try to descent into this class and won't try to automatically map it with some other type. The given typeElement will be excluded from the automatic sub-mapping generation
        Specified by:
        isExcluded in interface MappingExclusionProvider
        Parameters:
        typeElement - that needs to be checked
        Returns:
        true if MapStruct should exclude the provided TypeElement from an automatic sub-mapping
      • isFullyQualifiedNameExcluded

        protected boolean isFullyQualifiedNameExcluded​(javax.lang.model.element.Name name)