Class Type.TypeVarMatcher

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private boolean isJavaLangObject​(javax.lang.model.type.TypeMirror type)  
      Type.ResolvedPair visitArray​(javax.lang.model.type.ArrayType parameterized, Type declared)  
      Type.ResolvedPair visitDeclared​(javax.lang.model.type.DeclaredType parameterized, Type declared)  
      Type.ResolvedPair visitTypeVariable​(javax.lang.model.type.TypeVariable parameterized, Type declared)  
      Type.ResolvedPair visitWildcard​(javax.lang.model.type.WildcardType parameterized, Type declared)
      If ? extends SomeTime equals the boundary set in typeVarToMatch (NOTE: you can't compare the wildcard itself) then return a result;
      • Methods inherited from class javax.lang.model.util.SimpleTypeVisitor8

        visitIntersection
      • Methods inherited from class javax.lang.model.util.SimpleTypeVisitor7

        visitUnion
      • Methods inherited from class javax.lang.model.util.SimpleTypeVisitor6

        defaultAction, visitError, visitExecutable, visitNoType, visitNull, visitPrimitive
      • Methods inherited from class javax.lang.model.util.AbstractTypeVisitor6

        visit, visit, visitUnknown
      • Methods inherited from class java.lang.Object

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

      • typeToMatch

        private final Type typeToMatch
    • Constructor Detail

      • TypeVarMatcher

        TypeVarMatcher​(TypeFactory typeFactory,
                       TypeUtils types,
                       Type typeToMatch)
        Parameters:
        typeFactory - factory
        types - type utils
        typeToMatch - the typeVar or wildcard with typeVar bound
    • Method Detail

      • visitTypeVariable

        public Type.ResolvedPair visitTypeVariable​(javax.lang.model.type.TypeVariable parameterized,
                                                   Type declared)
        Specified by:
        visitTypeVariable in interface javax.lang.model.type.TypeVisitor<Type.ResolvedPair,​Type>
        Overrides:
        visitTypeVariable in class javax.lang.model.util.SimpleTypeVisitor6<Type.ResolvedPair,​Type>
      • visitWildcard

        public Type.ResolvedPair visitWildcard​(javax.lang.model.type.WildcardType parameterized,
                                               Type declared)
        If ? extends SomeTime equals the boundary set in typeVarToMatch (NOTE: you can't compare the wildcard itself) then return a result;
        Specified by:
        visitWildcard in interface javax.lang.model.type.TypeVisitor<Type.ResolvedPair,​Type>
        Overrides:
        visitWildcard in class javax.lang.model.util.SimpleTypeVisitor6<Type.ResolvedPair,​Type>
      • visitArray

        public Type.ResolvedPair visitArray​(javax.lang.model.type.ArrayType parameterized,
                                            Type declared)
        Specified by:
        visitArray in interface javax.lang.model.type.TypeVisitor<Type.ResolvedPair,​Type>
        Overrides:
        visitArray in class javax.lang.model.util.SimpleTypeVisitor6<Type.ResolvedPair,​Type>
      • visitDeclared

        public Type.ResolvedPair visitDeclared​(javax.lang.model.type.DeclaredType parameterized,
                                               Type declared)
        Specified by:
        visitDeclared in interface javax.lang.model.type.TypeVisitor<Type.ResolvedPair,​Type>
        Overrides:
        visitDeclared in class javax.lang.model.util.SimpleTypeVisitor6<Type.ResolvedPair,​Type>
      • isJavaLangObject

        private boolean isJavaLangObject​(javax.lang.model.type.TypeMirror type)