protected class UnitsAnnotatedTypeFactory.UnitsQualifierHierarchy extends GraphQualifierHierarchy
MultiGraphQualifierHierarchy.MultiGraphFactory
bottoms, polymorphicQualifier, polyQualifiers, supertypesGraph, supertypesMap, tops
Constructor and Description |
---|
UnitsQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory mgf,
AnnotationMirror bottom) |
Modifier and Type | Method and Description |
---|---|
boolean |
isSubtype(AnnotationMirror subAnno,
AnnotationMirror superAnno)
Tests whether rhs is equal to or a sub-qualifier of lhs, according to the type qualifier
hierarchy.
|
AnnotationMirror |
leastUpperBound(AnnotationMirror a1,
AnnotationMirror a2)
Returns the least upper bound for the qualifiers a1 and a2.
|
finish, getBottomAnnotations, getTopAnnotations, isSubtype
addPolyRelations, buildFullMap, findBottoms, findLub, findTops, getBottomAnnotation, getPolymorphicAnnotation, getTopAnnotation, getTypeQualifiers, greatestLowerBound, greatestLowerBoundTypeVariable, isSubtypeTypeVariable, isSubtypeTypeVariable, leastUpperBoundTypeVariable, toString
canHaveEmptyAnnotationSet, findAnnotationInHierarchy, findAnnotationInSameHierarchy, findCorrespondingAnnotation, getAnnotationInHierarchy, getWidth, greatestLowerBound, greatestLowerBounds, greatestLowerBounds, greatestLowerBoundsTypeVariable, implementsWidening, isSubtype, isSubtype, isValid, leastUpperBound, leastUpperBounds, leastUpperBounds, leastUpperBoundsTypeVariable, replacePolyAll, updateMappingToMutableSet, widenUpperBound
public UnitsQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory mgf, AnnotationMirror bottom)
public boolean isSubtype(AnnotationMirror subAnno, AnnotationMirror superAnno)
MultiGraphQualifierHierarchy
Most qualifiers have no value fields. However, two annotations with values are subtype of each other only if they have the same values. i.e. I(m) is a subtype of I(n) iff m = n
When client specifies an annotation, a1, to be a subtype of annotation with values, a2, then a1 is a subtype of all instances of a2 regardless of a2 values.
isSubtype
in class MultiGraphQualifierHierarchy
subAnno
- the sub qualifiersuperAnno
- the super qualifierpublic AnnotationMirror leastUpperBound(AnnotationMirror a1, AnnotationMirror a2)
QualifierHierarchy
Examples:
leastUpperBound
in class MultiGraphQualifierHierarchy