Class AbstractTypeUtilsDecorator

  • All Implemented Interfaces:
    javax.lang.model.util.Types, TypeUtils
    Direct Known Subclasses:
    EclipseTypeUtilsDecorator, JavacTypeUtilsDecorator

    public abstract class AbstractTypeUtilsDecorator
    extends java.lang.Object
    implements TypeUtils
    Replaces the usage of TypeUtils within MapStruct by delegating to the original implementation or to our specific workarounds if necessary.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.lang.model.util.Types delegate  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractTypeUtilsDecorator​(javax.annotation.processing.ProcessingEnvironment processingEnv)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.lang.model.element.Element asElement​(javax.lang.model.type.TypeMirror t)  
      javax.lang.model.type.TypeMirror asMemberOf​(javax.lang.model.type.DeclaredType containing, javax.lang.model.element.Element element)  
      javax.lang.model.element.TypeElement boxedClass​(javax.lang.model.type.PrimitiveType p)  
      javax.lang.model.type.TypeMirror capture​(javax.lang.model.type.TypeMirror t)  
      boolean contains​(javax.lang.model.type.TypeMirror t1, javax.lang.model.type.TypeMirror t2)  
      java.util.List<? extends javax.lang.model.type.TypeMirror> directSupertypes​(javax.lang.model.type.TypeMirror t)  
      javax.lang.model.type.TypeMirror erasure​(javax.lang.model.type.TypeMirror t)  
      javax.lang.model.type.ArrayType getArrayType​(javax.lang.model.type.TypeMirror componentType)  
      javax.lang.model.type.DeclaredType getDeclaredType​(javax.lang.model.element.TypeElement typeElem, javax.lang.model.type.TypeMirror... typeArgs)  
      javax.lang.model.type.DeclaredType getDeclaredType​(javax.lang.model.type.DeclaredType containing, javax.lang.model.element.TypeElement typeElem, javax.lang.model.type.TypeMirror... typeArgs)  
      javax.lang.model.type.NoType getNoType​(javax.lang.model.type.TypeKind kind)  
      javax.lang.model.type.NullType getNullType()  
      javax.lang.model.type.PrimitiveType getPrimitiveType​(javax.lang.model.type.TypeKind kind)  
      javax.lang.model.type.WildcardType getWildcardType​(javax.lang.model.type.TypeMirror extendsBound, javax.lang.model.type.TypeMirror superBound)  
      boolean isAssignable​(javax.lang.model.type.TypeMirror t1, javax.lang.model.type.TypeMirror t2)  
      boolean isSameType​(javax.lang.model.type.TypeMirror t1, javax.lang.model.type.TypeMirror t2)  
      boolean isSubsignature​(javax.lang.model.type.ExecutableType m1, javax.lang.model.type.ExecutableType m2)  
      boolean isSubtype​(javax.lang.model.type.TypeMirror t1, javax.lang.model.type.TypeMirror t2)  
      boolean isSubtypeErased​(javax.lang.model.type.TypeMirror t1, javax.lang.model.type.TypeMirror t2)  
      javax.lang.model.type.PrimitiveType unboxedType​(javax.lang.model.type.TypeMirror t)  
      • Methods inherited from class java.lang.Object

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

      • delegate

        private final javax.lang.model.util.Types delegate
    • Constructor Detail

      • AbstractTypeUtilsDecorator

        AbstractTypeUtilsDecorator​(javax.annotation.processing.ProcessingEnvironment processingEnv)
    • Method Detail

      • asElement

        public javax.lang.model.element.Element asElement​(javax.lang.model.type.TypeMirror t)
        Specified by:
        asElement in interface javax.lang.model.util.Types
      • isSameType

        public boolean isSameType​(javax.lang.model.type.TypeMirror t1,
                                  javax.lang.model.type.TypeMirror t2)
        Specified by:
        isSameType in interface javax.lang.model.util.Types
      • isSubtype

        public boolean isSubtype​(javax.lang.model.type.TypeMirror t1,
                                 javax.lang.model.type.TypeMirror t2)
        Specified by:
        isSubtype in interface javax.lang.model.util.Types
      • isAssignable

        public boolean isAssignable​(javax.lang.model.type.TypeMirror t1,
                                    javax.lang.model.type.TypeMirror t2)
        Specified by:
        isAssignable in interface javax.lang.model.util.Types
      • contains

        public boolean contains​(javax.lang.model.type.TypeMirror t1,
                                javax.lang.model.type.TypeMirror t2)
        Specified by:
        contains in interface javax.lang.model.util.Types
      • isSubsignature

        public boolean isSubsignature​(javax.lang.model.type.ExecutableType m1,
                                      javax.lang.model.type.ExecutableType m2)
        Specified by:
        isSubsignature in interface javax.lang.model.util.Types
      • directSupertypes

        public java.util.List<? extends javax.lang.model.type.TypeMirror> directSupertypes​(javax.lang.model.type.TypeMirror t)
        Specified by:
        directSupertypes in interface javax.lang.model.util.Types
      • erasure

        public javax.lang.model.type.TypeMirror erasure​(javax.lang.model.type.TypeMirror t)
        Specified by:
        erasure in interface javax.lang.model.util.Types
      • boxedClass

        public javax.lang.model.element.TypeElement boxedClass​(javax.lang.model.type.PrimitiveType p)
        Specified by:
        boxedClass in interface javax.lang.model.util.Types
      • unboxedType

        public javax.lang.model.type.PrimitiveType unboxedType​(javax.lang.model.type.TypeMirror t)
        Specified by:
        unboxedType in interface javax.lang.model.util.Types
      • capture

        public javax.lang.model.type.TypeMirror capture​(javax.lang.model.type.TypeMirror t)
        Specified by:
        capture in interface javax.lang.model.util.Types
      • getPrimitiveType

        public javax.lang.model.type.PrimitiveType getPrimitiveType​(javax.lang.model.type.TypeKind kind)
        Specified by:
        getPrimitiveType in interface javax.lang.model.util.Types
      • getNullType

        public javax.lang.model.type.NullType getNullType()
        Specified by:
        getNullType in interface javax.lang.model.util.Types
      • getNoType

        public javax.lang.model.type.NoType getNoType​(javax.lang.model.type.TypeKind kind)
        Specified by:
        getNoType in interface javax.lang.model.util.Types
      • getArrayType

        public javax.lang.model.type.ArrayType getArrayType​(javax.lang.model.type.TypeMirror componentType)
        Specified by:
        getArrayType in interface javax.lang.model.util.Types
      • getWildcardType

        public javax.lang.model.type.WildcardType getWildcardType​(javax.lang.model.type.TypeMirror extendsBound,
                                                                  javax.lang.model.type.TypeMirror superBound)
        Specified by:
        getWildcardType in interface javax.lang.model.util.Types
      • getDeclaredType

        public javax.lang.model.type.DeclaredType getDeclaredType​(javax.lang.model.element.TypeElement typeElem,
                                                                  javax.lang.model.type.TypeMirror... typeArgs)
        Specified by:
        getDeclaredType in interface javax.lang.model.util.Types
      • getDeclaredType

        public javax.lang.model.type.DeclaredType getDeclaredType​(javax.lang.model.type.DeclaredType containing,
                                                                  javax.lang.model.element.TypeElement typeElem,
                                                                  javax.lang.model.type.TypeMirror... typeArgs)
        Specified by:
        getDeclaredType in interface javax.lang.model.util.Types
      • asMemberOf

        public javax.lang.model.type.TypeMirror asMemberOf​(javax.lang.model.type.DeclaredType containing,
                                                           javax.lang.model.element.Element element)
        Specified by:
        asMemberOf in interface javax.lang.model.util.Types
      • isSubtypeErased

        public boolean isSubtypeErased​(javax.lang.model.type.TypeMirror t1,
                                       javax.lang.model.type.TypeMirror t2)
        Specified by:
        isSubtypeErased in interface TypeUtils