protected class NullnessAnnotatedTypeFactory.NullnessQualifierHierarchy extends InitializationAnnotatedTypeFactory.InitializationQualifierHierarchy
MultiGraphQualifierHierarchy.MultiGraphFactory
bottoms, polyQualifiers, supertypesDirect, supertypesTransitive, tops
Constructor and Description |
---|
NullnessQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory f,
Object[] arg) |
Modifier and Type | Method and Description |
---|---|
boolean |
isSubtype(AnnotationMirror subAnno,
AnnotationMirror superAnno)
Tests whether
subQualifier is equal to or a sub-qualifier of superQualifier ,
according to the type qualifier hierarchy. |
AnnotationMirror |
leastUpperBound(AnnotationMirror a1,
AnnotationMirror a2)
Returns the least upper bound (LUB) of the qualifiers
qualifier1 and qualifier2 . |
greatestLowerBound, isSubtypeInitialization, leastUpperBoundInitialization, lubTypeFrame
addPolyRelations, findBottoms, findLub, findTops, finish, getBottomAnnotation, getBottomAnnotations, getPolymorphicAnnotation, getTopAnnotation, getTopAnnotations, isPolymorphicQualifier, isSubtype, isValid, toString, transitiveClosure
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
assertSameSize, assertSameSize, canHaveEmptyAnnotationSet, findAnnotationInHierarchy, findAnnotationInSameHierarchy, getWidth, greatestLowerBound, greatestLowerBounds, greatestLowerBounds, greatestLowerBoundsTypeVariable, greatestLowerBoundTypeVariable, isSubtype, isSubtype, isSubtypeTypeVariable, isSubtypeTypeVariable, leastUpperBound, leastUpperBounds, leastUpperBounds, leastUpperBoundsTypeVariable, leastUpperBoundTypeVariable, numberOfIterationsBeforeWidening, updateMappingToMutableSet, widenedUpperBound
public NullnessQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory f, Object[] arg)
public boolean isSubtype(AnnotationMirror subAnno, AnnotationMirror superAnno)
MultiGraphQualifierHierarchy
subQualifier
is equal to or a sub-qualifier of superQualifier
,
according to the type qualifier hierarchy.
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 interface QualifierHierarchy
isSubtype
in class MultiGraphQualifierHierarchy
subAnno
- the sub qualifiersuperAnno
- the super qualifiersubQualifier
is a subqualifier of, or equal to, superQualifier
public AnnotationMirror leastUpperBound(AnnotationMirror a1, AnnotationMirror a2)
QualifierHierarchy
qualifier1
and qualifier2
. Returns null
if the qualifiers are not from the same qualifier
hierarchy.
Examples:
leastUpperBound
in interface QualifierHierarchy
leastUpperBound
in class MultiGraphQualifierHierarchy
a1
- the first qualifier; may not be in the same hierarchy as qualifier2
a2
- the second qualifier; may not be in the same hierarchy as qualifier1
null
if the qualifiers are from
different hierarchies