@AnnotatedFor(value="nullness") public class SubtypeIsSupersetQualifierHierarchy extends MostlyNoElementQualifierHierarchy
QualifierHierarchy
where, when a qualifier has
arguments, the subtype relation is determined by a superset test on the elements (arguments). The
elements must be strings.
This assumes that if the lub or glb of two qualifiers has elements, then both of the arguments had the same kind as the result does.
bottoms, bottomsMap, kindToElementlessQualifier, qualifierKindHierarchy, tops, topsMap
Constructor and Description |
---|
SubtypeIsSupersetQualifierHierarchy(Collection<Class<? extends Annotation>> qualifierClasses,
ProcessingEnvironment processingEnv)
Creates a SubtypeIsSupersetQualifierHierarchy from the given classes.
|
Modifier and Type | Method and Description |
---|---|
protected AnnotationMirror |
greatestLowerBoundWithElements(AnnotationMirror a1,
QualifierKind qualifierKind1,
AnnotationMirror a2,
QualifierKind qualifierKind2,
QualifierKind glbKind)
Returns the greatest lower bound of
a1 and a2 in cases where the glb of qualifierKind1 and qualifierKind2 is a qualifier kind that has elements. |
protected boolean |
isSubtypeWithElements(AnnotationMirror subAnno,
QualifierKind subKind,
AnnotationMirror superAnno,
QualifierKind superKind)
Returns true if
subAnno is a subtype of superAnno . |
protected AnnotationMirror |
leastUpperBoundWithElements(AnnotationMirror a1,
QualifierKind qualifierKind1,
AnnotationMirror a2,
QualifierKind qualifierKind2,
QualifierKind lubKind)
Returns the least upper bound of
a1 and a2 in cases where the lub of qualifierKind1 and qualifierKind2 is a qualifier kind that has elements. |
greatestLowerBound, isSubtype, leastUpperBound
createBottomsMap, createElementlessQualifierMap, createQualifierKindHierarchy, createTopsMap, findAnnotationInHierarchy, findAnnotationInSameHierarchy, getBottomAnnotation, getBottomAnnotations, getPolymorphicAnnotation, getQualifierKind, getQualifierKind, getTopAnnotation, getTopAnnotations, isPolymorphicQualifier, isValid
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
assertSameSize, assertSameSize, canHaveEmptyAnnotationSet, getWidth, greatestLowerBounds, isSubtype, leastUpperBounds, numberOfIterationsBeforeWidening, updateMappingToMutableSet, widenedUpperBound
public SubtypeIsSupersetQualifierHierarchy(Collection<Class<? extends Annotation>> qualifierClasses, ProcessingEnvironment processingEnv)
qualifierClasses
- classes of annotations that are the qualifiers for this hierarchyprocessingEnv
- processing environmentprotected boolean isSubtypeWithElements(AnnotationMirror subAnno, QualifierKind subKind, AnnotationMirror superAnno, QualifierKind superKind)
MostlyNoElementQualifierHierarchy
subAnno
is a subtype of superAnno
. Both subAnno
and
superAnno
are annotations with elements. subKind
is a sub qualifier kind of
superKind
.isSubtypeWithElements
in class MostlyNoElementQualifierHierarchy
subAnno
- possible subtype annotation; has elementssubKind
- QualifierKind of subAnno
superAnno
- possible super annotation; has elementssuperKind
- QualifierKind of superAnno
subAnno
is a subtype of superAnno
protected AnnotationMirror leastUpperBoundWithElements(AnnotationMirror a1, QualifierKind qualifierKind1, AnnotationMirror a2, QualifierKind qualifierKind2, QualifierKind lubKind)
MostlyNoElementQualifierHierarchy
a1
and a2
in cases where the lub of qualifierKind1
and qualifierKind2
is a qualifier kind that has elements. If the lub of
qualifierKind1
and qualifierKind2
does not have elements, then MostlyNoElementQualifierHierarchy.leastUpperBound(AnnotationMirror, AnnotationMirror)
returns the correct AnnotationMirror
without calling this method.leastUpperBoundWithElements
in class MostlyNoElementQualifierHierarchy
a1
- first annotationqualifierKind1
- QualifierKind for a1
a2
- second annotationqualifierKind2
- QualifierKind for a2
lubKind
- the kind of the lub of qualifierKind1
and qualifierKind2
a1
and a2
protected AnnotationMirror greatestLowerBoundWithElements(AnnotationMirror a1, QualifierKind qualifierKind1, AnnotationMirror a2, QualifierKind qualifierKind2, QualifierKind glbKind)
MostlyNoElementQualifierHierarchy
a1
and a2
in cases where the glb of qualifierKind1
and qualifierKind2
is a qualifier kind that has elements. If the glb of
qualifierKind1
and qualifierKind2
does not have elements, then MostlyNoElementQualifierHierarchy.greatestLowerBound(AnnotationMirror, AnnotationMirror)
returns the correct AnnotationMirror
without calling this method.greatestLowerBoundWithElements
in class MostlyNoElementQualifierHierarchy
a1
- first annotationqualifierKind1
- QualifierKind for a1
a2
- second annotationqualifierKind2
- QualifierKind for a2
a1
and a2