public class DefaultTypeHierarchy extends AbstractAtmComboVisitor<Boolean,VisitHistory> implements TypeHierarchy
Subtyping rules of the JLS can be found in section 4.10, "Subtyping": http://docs.oracle.com/javase/specs/jls/se8/html/jls-4.html#jls-4.10
Note: The visit methods of this class must be public but it is intended to be used through a TypeHierarchy interface reference which will only allow isSubtype to be called. It does not make sense to call the visit methods on their own.
Modifier and Type | Field and Description |
---|---|
protected BaseTypeChecker |
checker |
protected AnnotationMirror |
currentTop |
protected StructuralEqualityComparer |
equalityComparer |
protected boolean |
ignoreRawTypes |
protected boolean |
invariantArrayComponents |
protected QualifierHierarchy |
qualifierHierarchy |
protected DefaultRawnessComparer |
rawnessComparer |
Constructor and Description |
---|
DefaultTypeHierarchy(BaseTypeChecker checker,
QualifierHierarchy qualifierHierarchy,
boolean ignoreRawTypes,
boolean invariantArrayComponents) |
defaultAction, visit, visitArray_Executable, visitArray_None, visitArray_Primitive, visitArray_Typevar, visitArray_Union, visitDeclared_Executable, visitDeclared_None, visitExecutable_Array, visitExecutable_Declared, visitExecutable_Executable, visitExecutable_Intersection, visitExecutable_None, visitExecutable_Null, visitExecutable_Primitive, visitExecutable_Typevar, visitExecutable_Union, visitExecutable_Wildcard, visitIntersection_Array, visitIntersection_Executable, visitIntersection_None, visitIntersection_Union, visitIntersection_Wildcard, visitNone_Array, visitNone_Declared, visitNone_Executable, visitNone_Intersection, visitNone_None, visitNone_Null, visitNone_Primitive, visitNone_Union, visitNone_Wildcard, visitNull_Executable, visitNull_None, visitPrimitive_Array, visitPrimitive_Executable, visitPrimitive_None, visitPrimitive_Null, visitPrimitive_Typevar, visitPrimitive_Union, visitTypevar_Array, visitTypevar_Executable, visitTypevar_None, visitTypevar_Union, visitUnion_Array, visitUnion_Executable, visitUnion_None, visitUnion_Null, visitUnion_Primitive, visitUnion_Typevar, visitUnion_Wildcard, visitWildcard_Executable, visitWildcard_None, visitWildcard_Null, visitWildcard_Union
protected final BaseTypeChecker checker
protected final QualifierHierarchy qualifierHierarchy
protected final StructuralEqualityComparer equalityComparer
protected final DefaultRawnessComparer rawnessComparer
protected final boolean ignoreRawTypes
protected final boolean invariantArrayComponents
protected AnnotationMirror currentTop
public DefaultTypeHierarchy(BaseTypeChecker checker, QualifierHierarchy qualifierHierarchy, boolean ignoreRawTypes, boolean invariantArrayComponents)
public DefaultRawnessComparer createRawnessComparer()
public StructuralEqualityComparer createEqualityComparer()
public boolean isSubtype(AnnotatedTypeMirror subtype, AnnotatedTypeMirror supertype)
isSubtype
in interface TypeHierarchy
subtype
- expected subtypesupertype
- expected supertypepublic boolean isSubtype(AnnotatedTypeMirror subtype, AnnotatedTypeMirror supertype, AnnotationMirror top)
isSubtype
in interface TypeHierarchy
subtype
- expected subtypesupertype
- expected supertypetop
- the hierarchy for which we want to make a comparisonpublic boolean areSubtypes(Iterable<? extends AnnotatedTypeMirror> subtypes, Iterable<? extends AnnotatedTypeMirror> supertypes)
protected String defaultErrorMessage(AnnotatedTypeMirror subtype, AnnotatedTypeMirror supertype, VisitHistory visited)
AbstractAtmComboVisitor
defaultErrorMessage
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
subtype
- the first AnnotatedTypeMirror parameter to the visit method calledsupertype
- the second AnnotatedTypeMirror parameter to the visit method calledvisited
- subtype specific parameter passed to every visit methodpublic boolean isSubtype(AnnotatedTypeMirror subtype, AnnotatedTypeMirror supertype, VisitHistory visited)
subtype
- expected subtypesupertype
- expected supertypeprotected boolean isPrimarySubtype(AnnotatedTypeMirror subtype, AnnotatedTypeMirror supertype)
protected boolean isPrimarySubtype(AnnotatedTypeMirror subtype, AnnotatedTypeMirror supertype, boolean annosCanBeEmtpy)
annosCanBeEmtpy
- indicates that annotations may be missing from the typemirrorprotected boolean isAnnoSubtype(AnnotationMirror subtypeAnno, AnnotationMirror supertypeAnno, boolean annosCanBeEmtpy)
subtypeAnno
- annotation we expect to be a subtypesupertypeAnno
- annotation we expect to be a supertype of subtypeannosCanBeEmtpy
- indicates that annotations may be missing from the typemirrorprotected boolean isBottom(AnnotatedTypeMirror subtype)
subtype
- type to isValid against bottomprotected boolean checkAndSubtype(AnnotatedTypeMirror subtype, AnnotatedTypeMirror supertype, VisitHistory visited)
protected boolean isSubtypeOfAll(AnnotatedTypeMirror subtype, Iterable<? extends AnnotatedTypeMirror> supertypes, VisitHistory visited)
protected boolean areAllSubtypes(Iterable<? extends AnnotatedTypeMirror> subtypes, AnnotatedTypeMirror supertype, VisitHistory visited)
protected boolean areEqual(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2)
protected boolean areEqualInHierarchy(AnnotatedTypeMirror type1, AnnotatedTypeMirror type2, AnnotationMirror top)
protected boolean isContainedBy(AnnotatedTypeMirror inside, AnnotatedTypeMirror outside, VisitHistory visited, boolean canBeCovariant)
inside
- the "subtype" type argumentoutside
- the "supertype" type argumentvisited
- a history of type pairs that have been visited, used to halt on recursive
boundscanBeCovariant
- whether or not type arguments are allowed to be covariantpublic Boolean visitArray_Array(AnnotatedTypeMirror.AnnotatedArrayType subtype, AnnotatedTypeMirror.AnnotatedArrayType supertype, VisitHistory visited)
visitArray_Array
in interface AtmComboVisitor<Boolean,VisitHistory>
visitArray_Array
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitArray_Declared(AnnotatedTypeMirror.AnnotatedArrayType subtype, AnnotatedTypeMirror.AnnotatedDeclaredType supertype, VisitHistory visited)
visitArray_Declared
in interface AtmComboVisitor<Boolean,VisitHistory>
visitArray_Declared
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitArray_Null(AnnotatedTypeMirror.AnnotatedArrayType subtype, AnnotatedTypeMirror.AnnotatedNullType supertype, VisitHistory visited)
visitArray_Null
in interface AtmComboVisitor<Boolean,VisitHistory>
visitArray_Null
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitArray_Intersection(AnnotatedTypeMirror.AnnotatedArrayType subtype, AnnotatedTypeMirror.AnnotatedIntersectionType supertype, VisitHistory visitHistory)
visitArray_Intersection
in interface AtmComboVisitor<Boolean,VisitHistory>
visitArray_Intersection
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitArray_Wildcard(AnnotatedTypeMirror.AnnotatedArrayType subtype, AnnotatedTypeMirror.AnnotatedWildcardType supertype, VisitHistory visited)
visitArray_Wildcard
in interface AtmComboVisitor<Boolean,VisitHistory>
visitArray_Wildcard
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitDeclared_Array(AnnotatedTypeMirror.AnnotatedDeclaredType subtype, AnnotatedTypeMirror.AnnotatedArrayType supertype, VisitHistory visited)
visitDeclared_Array
in interface AtmComboVisitor<Boolean,VisitHistory>
visitDeclared_Array
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitDeclared_Declared(AnnotatedTypeMirror.AnnotatedDeclaredType subtype, AnnotatedTypeMirror.AnnotatedDeclaredType supertype, VisitHistory visited)
visitDeclared_Declared
in interface AtmComboVisitor<Boolean,VisitHistory>
visitDeclared_Declared
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitTypeArgs(AnnotatedTypeMirror.AnnotatedDeclaredType subtype, AnnotatedTypeMirror.AnnotatedDeclaredType supertype, VisitHistory visited, boolean subtypeRaw, boolean supertypeRaw)
protected boolean compareTypeArgs(AnnotatedTypeMirror subTypeArg, AnnotatedTypeMirror superTypeArg, boolean subtypeRaw, boolean supertypeRaw, boolean isCovariant, VisitHistory visited)
public Boolean visitDeclared_Intersection(AnnotatedTypeMirror.AnnotatedDeclaredType subtype, AnnotatedTypeMirror.AnnotatedIntersectionType supertype, VisitHistory visited)
visitDeclared_Intersection
in interface AtmComboVisitor<Boolean,VisitHistory>
visitDeclared_Intersection
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitDeclared_Null(AnnotatedTypeMirror.AnnotatedDeclaredType subtype, AnnotatedTypeMirror.AnnotatedNullType supertype, VisitHistory visited)
visitDeclared_Null
in interface AtmComboVisitor<Boolean,VisitHistory>
visitDeclared_Null
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitDeclared_Primitive(AnnotatedTypeMirror.AnnotatedDeclaredType subtype, AnnotatedTypeMirror.AnnotatedPrimitiveType supertype, VisitHistory visited)
visitDeclared_Primitive
in interface AtmComboVisitor<Boolean,VisitHistory>
visitDeclared_Primitive
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitDeclared_Typevar(AnnotatedTypeMirror.AnnotatedDeclaredType subtype, AnnotatedTypeMirror.AnnotatedTypeVariable supertype, VisitHistory visited)
visitDeclared_Typevar
in interface AtmComboVisitor<Boolean,VisitHistory>
visitDeclared_Typevar
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitDeclared_Union(AnnotatedTypeMirror.AnnotatedDeclaredType subtype, AnnotatedTypeMirror.AnnotatedUnionType supertype, VisitHistory visited)
visitDeclared_Union
in interface AtmComboVisitor<Boolean,VisitHistory>
visitDeclared_Union
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitDeclared_Wildcard(AnnotatedTypeMirror.AnnotatedDeclaredType subtype, AnnotatedTypeMirror.AnnotatedWildcardType supertype, VisitHistory visited)
visitDeclared_Wildcard
in interface AtmComboVisitor<Boolean,VisitHistory>
visitDeclared_Wildcard
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitIntersection_Declared(AnnotatedTypeMirror.AnnotatedIntersectionType subtype, AnnotatedTypeMirror.AnnotatedDeclaredType supertype, VisitHistory visited)
visitIntersection_Declared
in interface AtmComboVisitor<Boolean,VisitHistory>
visitIntersection_Declared
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitIntersection_Primitive(AnnotatedTypeMirror.AnnotatedIntersectionType subtype, AnnotatedTypeMirror.AnnotatedPrimitiveType supertype, VisitHistory visited)
visitIntersection_Primitive
in interface AtmComboVisitor<Boolean,VisitHistory>
visitIntersection_Primitive
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitIntersection_Intersection(AnnotatedTypeMirror.AnnotatedIntersectionType subtype, AnnotatedTypeMirror.AnnotatedIntersectionType supertype, VisitHistory visited)
visitIntersection_Intersection
in interface AtmComboVisitor<Boolean,VisitHistory>
visitIntersection_Intersection
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitIntersection_Null(AnnotatedTypeMirror.AnnotatedIntersectionType subtype, AnnotatedTypeMirror.AnnotatedNullType supertype, VisitHistory visited)
visitIntersection_Null
in interface AtmComboVisitor<Boolean,VisitHistory>
visitIntersection_Null
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitIntersection_Typevar(AnnotatedTypeMirror.AnnotatedIntersectionType subtype, AnnotatedTypeMirror.AnnotatedTypeVariable supertype, VisitHistory visited)
visitIntersection_Typevar
in interface AtmComboVisitor<Boolean,VisitHistory>
visitIntersection_Typevar
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitNull_Array(AnnotatedTypeMirror.AnnotatedNullType subtype, AnnotatedTypeMirror.AnnotatedArrayType supertype, VisitHistory visited)
visitNull_Array
in interface AtmComboVisitor<Boolean,VisitHistory>
visitNull_Array
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitNull_Declared(AnnotatedTypeMirror.AnnotatedNullType subtype, AnnotatedTypeMirror.AnnotatedDeclaredType supertype, VisitHistory visited)
visitNull_Declared
in interface AtmComboVisitor<Boolean,VisitHistory>
visitNull_Declared
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitNull_Typevar(AnnotatedTypeMirror.AnnotatedNullType subtype, AnnotatedTypeMirror.AnnotatedTypeVariable supertype, VisitHistory visited)
visitNull_Typevar
in interface AtmComboVisitor<Boolean,VisitHistory>
visitNull_Typevar
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitNull_Wildcard(AnnotatedTypeMirror.AnnotatedNullType subtype, AnnotatedTypeMirror.AnnotatedWildcardType supertype, VisitHistory visited)
visitNull_Wildcard
in interface AtmComboVisitor<Boolean,VisitHistory>
visitNull_Wildcard
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitNull_Null(AnnotatedTypeMirror.AnnotatedNullType subtype, AnnotatedTypeMirror.AnnotatedNullType supertype, VisitHistory visited)
visitNull_Null
in interface AtmComboVisitor<Boolean,VisitHistory>
visitNull_Null
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitNull_Union(AnnotatedTypeMirror.AnnotatedNullType subtype, AnnotatedTypeMirror.AnnotatedUnionType supertype, VisitHistory visited)
visitNull_Union
in interface AtmComboVisitor<Boolean,VisitHistory>
visitNull_Union
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitNull_Intersection(AnnotatedTypeMirror.AnnotatedNullType subtype, AnnotatedTypeMirror.AnnotatedIntersectionType supertype, VisitHistory visited)
visitNull_Intersection
in interface AtmComboVisitor<Boolean,VisitHistory>
visitNull_Intersection
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitNull_Primitive(AnnotatedTypeMirror.AnnotatedNullType subtype, AnnotatedTypeMirror.AnnotatedPrimitiveType supertype, VisitHistory visited)
visitNull_Primitive
in interface AtmComboVisitor<Boolean,VisitHistory>
visitNull_Primitive
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitPrimitive_Declared(AnnotatedTypeMirror.AnnotatedPrimitiveType subtype, AnnotatedTypeMirror.AnnotatedDeclaredType supertype, VisitHistory visited)
visitPrimitive_Declared
in interface AtmComboVisitor<Boolean,VisitHistory>
visitPrimitive_Declared
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitPrimitive_Primitive(AnnotatedTypeMirror.AnnotatedPrimitiveType subtype, AnnotatedTypeMirror.AnnotatedPrimitiveType supertype, VisitHistory visited)
visitPrimitive_Primitive
in interface AtmComboVisitor<Boolean,VisitHistory>
visitPrimitive_Primitive
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitPrimitive_Intersection(AnnotatedTypeMirror.AnnotatedPrimitiveType subtype, AnnotatedTypeMirror.AnnotatedIntersectionType supertype, VisitHistory visited)
visitPrimitive_Intersection
in interface AtmComboVisitor<Boolean,VisitHistory>
visitPrimitive_Intersection
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitPrimitive_Wildcard(AnnotatedTypeMirror.AnnotatedPrimitiveType subtype, AnnotatedTypeMirror.AnnotatedWildcardType supertype, VisitHistory visitHistory)
visitPrimitive_Wildcard
in interface AtmComboVisitor<Boolean,VisitHistory>
visitPrimitive_Wildcard
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitUnion_Declared(AnnotatedTypeMirror.AnnotatedUnionType subtype, AnnotatedTypeMirror.AnnotatedDeclaredType supertype, VisitHistory visited)
visitUnion_Declared
in interface AtmComboVisitor<Boolean,VisitHistory>
visitUnion_Declared
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitUnion_Intersection(AnnotatedTypeMirror.AnnotatedUnionType subtype, AnnotatedTypeMirror.AnnotatedIntersectionType supertype, VisitHistory visited)
visitUnion_Intersection
in interface AtmComboVisitor<Boolean,VisitHistory>
visitUnion_Intersection
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitUnion_Union(AnnotatedTypeMirror.AnnotatedUnionType subtype, AnnotatedTypeMirror.AnnotatedUnionType supertype, VisitHistory visited)
visitUnion_Union
in interface AtmComboVisitor<Boolean,VisitHistory>
visitUnion_Union
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitTypevar_Declared(AnnotatedTypeMirror.AnnotatedTypeVariable subtype, AnnotatedTypeMirror.AnnotatedDeclaredType supertype, VisitHistory visited)
visitTypevar_Declared
in interface AtmComboVisitor<Boolean,VisitHistory>
visitTypevar_Declared
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitTypevar_Intersection(AnnotatedTypeMirror.AnnotatedTypeVariable subtype, AnnotatedTypeMirror.AnnotatedIntersectionType supertype, VisitHistory visited)
visitTypevar_Intersection
in interface AtmComboVisitor<Boolean,VisitHistory>
visitTypevar_Intersection
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitTypevar_Primitive(AnnotatedTypeMirror.AnnotatedTypeVariable subtype, AnnotatedTypeMirror.AnnotatedPrimitiveType supertype, VisitHistory visited)
visitTypevar_Primitive
in interface AtmComboVisitor<Boolean,VisitHistory>
visitTypevar_Primitive
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitTypevar_Typevar(AnnotatedTypeMirror.AnnotatedTypeVariable subtype, AnnotatedTypeMirror.AnnotatedTypeVariable supertype, VisitHistory visited)
visitTypevar_Typevar
in interface AtmComboVisitor<Boolean,VisitHistory>
visitTypevar_Typevar
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitTypevar_Null(AnnotatedTypeMirror.AnnotatedTypeVariable subtype, AnnotatedTypeMirror.AnnotatedNullType supertype, VisitHistory visited)
visitTypevar_Null
in interface AtmComboVisitor<Boolean,VisitHistory>
visitTypevar_Null
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitTypevar_Wildcard(AnnotatedTypeMirror.AnnotatedTypeVariable subtype, AnnotatedTypeMirror.AnnotatedWildcardType supertype, VisitHistory visited)
visitTypevar_Wildcard
in interface AtmComboVisitor<Boolean,VisitHistory>
visitTypevar_Wildcard
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitWildcard_Array(AnnotatedTypeMirror.AnnotatedWildcardType subtype, AnnotatedTypeMirror.AnnotatedArrayType supertype, VisitHistory visited)
visitWildcard_Array
in interface AtmComboVisitor<Boolean,VisitHistory>
visitWildcard_Array
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitWildcard_Declared(AnnotatedTypeMirror.AnnotatedWildcardType subtype, AnnotatedTypeMirror.AnnotatedDeclaredType supertype, VisitHistory visited)
visitWildcard_Declared
in interface AtmComboVisitor<Boolean,VisitHistory>
visitWildcard_Declared
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitWildcard_Intersection(AnnotatedTypeMirror.AnnotatedWildcardType subtype, AnnotatedTypeMirror.AnnotatedIntersectionType supertype, VisitHistory visited)
visitWildcard_Intersection
in interface AtmComboVisitor<Boolean,VisitHistory>
visitWildcard_Intersection
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitWildcard_Primitive(AnnotatedTypeMirror.AnnotatedWildcardType subtype, AnnotatedTypeMirror.AnnotatedPrimitiveType supertype, VisitHistory visited)
visitWildcard_Primitive
in interface AtmComboVisitor<Boolean,VisitHistory>
visitWildcard_Primitive
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitWildcard_Typevar(AnnotatedTypeMirror.AnnotatedWildcardType subtype, AnnotatedTypeMirror.AnnotatedTypeVariable supertype, VisitHistory visited)
visitWildcard_Typevar
in interface AtmComboVisitor<Boolean,VisitHistory>
visitWildcard_Typevar
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
public Boolean visitWildcard_Wildcard(AnnotatedTypeMirror.AnnotatedWildcardType subtype, AnnotatedTypeMirror.AnnotatedWildcardType supertype, VisitHistory visited)
visitWildcard_Wildcard
in interface AtmComboVisitor<Boolean,VisitHistory>
visitWildcard_Wildcard
in class AbstractAtmComboVisitor<Boolean,VisitHistory>
protected boolean visitIntersectionSupertype(AnnotatedTypeMirror subtype, AnnotatedTypeMirror.AnnotatedIntersectionType supertype, VisitHistory visited)
protected boolean visitTypevarSupertype(AnnotatedTypeMirror subtype, AnnotatedTypeMirror.AnnotatedTypeVariable supertype, VisitHistory visited)
protected boolean visitTypevarSubtype(AnnotatedTypeMirror.AnnotatedTypeVariable subtype, AnnotatedTypeMirror supertype, VisitHistory visited)
protected Boolean visitUnionSubtype(AnnotatedTypeMirror.AnnotatedUnionType subtype, AnnotatedTypeMirror supertype, VisitHistory visited)
protected boolean visitWildcardSupertype(AnnotatedTypeMirror subtype, AnnotatedTypeMirror.AnnotatedWildcardType supertype, VisitHistory visited)
protected boolean visitWildcardSubtype(AnnotatedTypeMirror.AnnotatedWildcardType subtype, AnnotatedTypeMirror supertype, VisitHistory visited)
public static <T extends AnnotatedTypeMirror> T castedAsSuper(AnnotatedTypeMirror subtype, T supertype)
T
- the type of supertype and return typesubtype
- subtype to be transformed to supertypesupertype
- supertype that subtype is transformed to