Class FenumAnnotatedTypeFactory.FenumQualifierHierarchy
java.lang.Object
org.checkerframework.framework.type.QualifierHierarchy
org.checkerframework.framework.type.ElementQualifierHierarchy
org.checkerframework.framework.type.MostlyNoElementQualifierHierarchy
org.checkerframework.checker.fenum.FenumAnnotatedTypeFactory.FenumQualifierHierarchy
- Enclosing class:
- FenumAnnotatedTypeFactory
protected class FenumAnnotatedTypeFactory.FenumQualifierHierarchy
extends MostlyNoElementQualifierHierarchy
Fenum qualifier hierarchy.
-
Field Summary
Fields inherited from class org.checkerframework.framework.type.ElementQualifierHierarchy
bottoms, bottomsMap, kindToElementlessQualifier, qualifierKindHierarchy, tops, topsMap
Fields inherited from class org.checkerframework.framework.type.QualifierHierarchy
atypeFactory
-
Constructor Summary
ConstructorDescriptionFenumQualifierHierarchy
(Collection<Class<? extends Annotation>> qualifierClasses, Elements elements) Creates FenumQualifierHierarchy. -
Method Summary
Modifier and TypeMethodDescriptionprotected QualifierKindHierarchy
createQualifierKindHierarchy
(Collection<Class<? extends Annotation>> qualifierClasses) Create theQualifierKindHierarchy
.protected AnnotationMirror
greatestLowerBoundWithElements
(AnnotationMirror a1, QualifierKind qualifierKind1, AnnotationMirror a2, QualifierKind qualifierKind2, QualifierKind glbKind) Returns the greatest lower bound ofa1
anda2
in cases where the glb ofqualifierKind1
andqualifierKind2
is a qualifier kind that has elements.protected boolean
isSubtypeWithElements
(AnnotationMirror subAnno, QualifierKind subKind, AnnotationMirror superAnno, QualifierKind superKind) Returns true ifsubAnno
is a subtype ofsuperAnno
.protected AnnotationMirror
leastUpperBoundWithElements
(AnnotationMirror a1, QualifierKind qualifierKind1, AnnotationMirror a2, QualifierKind qualifierKind2, QualifierKind lubKind) Returns the least upper bound ofa1
anda2
in cases where the lub ofqualifierKind1
andqualifierKind2
is a qualifier kind that has elements.Methods inherited from class org.checkerframework.framework.type.MostlyNoElementQualifierHierarchy
greatestLowerBoundQualifiers, isSubtypeQualifiers, leastUpperBoundQualifiers
Methods inherited from class org.checkerframework.framework.type.ElementQualifierHierarchy
createBottomsMap, createElementlessQualifierMap, createTopsMap, findAnnotationInHierarchy, findAnnotationInSameHierarchy, getBottomAnnotation, getBottomAnnotations, getPolymorphicAnnotation, getQualifierKind, getQualifierKind, getTopAnnotation, getTopAnnotations, isPolymorphicQualifier, isValid
Methods inherited from class org.checkerframework.framework.type.QualifierHierarchy
assertSameSize, assertSameSize, canHaveEmptyAnnotationSet, getWidth, greatestLowerBoundQualifiersOnly, greatestLowerBoundShallow, greatestLowerBoundsShallow, isSubtypeQualifiersOnly, isSubtypeShallow, isSubtypeShallow, isSubtypeShallow, isSubtypeShallow, leastUpperBoundQualifiersOnly, leastUpperBoundShallow, leastUpperBoundsShallow, numberOfIterationsBeforeWidening, updateMappingToMutableSet, widenedUpperBound
-
Constructor Details
-
FenumQualifierHierarchy
public FenumQualifierHierarchy(Collection<Class<? extends Annotation>> qualifierClasses, Elements elements) Creates FenumQualifierHierarchy.- Parameters:
qualifierClasses
- qualifier classeselements
- element utils
-
-
Method Details
-
createQualifierKindHierarchy
protected QualifierKindHierarchy createQualifierKindHierarchy(@UnderInitialization FenumAnnotatedTypeFactory.FenumQualifierHierarchy this, Collection<Class<? extends Annotation>> qualifierClasses) Description copied from class:ElementQualifierHierarchy
Create theQualifierKindHierarchy
. (Subclasses may override to return a subclass of QualifierKindHierarchy.)- Overrides:
createQualifierKindHierarchy
in classElementQualifierHierarchy
- Parameters:
qualifierClasses
- classes of annotations that are the qualifiers for this hierarchy- Returns:
- the newly created qualifier kind hierarchy
-
isSubtypeWithElements
protected boolean isSubtypeWithElements(AnnotationMirror subAnno, QualifierKind subKind, AnnotationMirror superAnno, QualifierKind superKind) Description copied from class:MostlyNoElementQualifierHierarchy
Returns true ifsubAnno
is a subtype ofsuperAnno
. BothsubAnno
andsuperAnno
are annotations with elements.subKind
is a sub qualifier kind ofsuperKind
.- Specified by:
isSubtypeWithElements
in classMostlyNoElementQualifierHierarchy
- Parameters:
subAnno
- possible subtype annotation; has elementssubKind
- the QualifierKind ofsubAnno
superAnno
- possible super annotation; has elementssuperKind
- the QualifierKind ofsuperAnno
- Returns:
- true if
subAnno
is a subtype ofsuperAnno
-
leastUpperBoundWithElements
protected AnnotationMirror leastUpperBoundWithElements(AnnotationMirror a1, QualifierKind qualifierKind1, AnnotationMirror a2, QualifierKind qualifierKind2, QualifierKind lubKind) Description copied from class:MostlyNoElementQualifierHierarchy
Returns the least upper bound ofa1
anda2
in cases where the lub ofqualifierKind1
andqualifierKind2
is a qualifier kind that has elements. If the lub ofqualifierKind1
andqualifierKind2
does not have elements, thenQualifierHierarchy.leastUpperBoundShallow(AnnotationMirror, TypeMirror, AnnotationMirror, TypeMirror)
returns the correctAnnotationMirror
without calling this method.- Specified by:
leastUpperBoundWithElements
in classMostlyNoElementQualifierHierarchy
- Parameters:
a1
- first annotationqualifierKind1
- QualifierKind fora1
a2
- second annotationqualifierKind2
- QualifierKind fora2
lubKind
- the kind of the lub ofqualifierKind1
andqualifierKind2
- Returns:
- the least upper bound of
a1
anda2
-
greatestLowerBoundWithElements
protected AnnotationMirror greatestLowerBoundWithElements(AnnotationMirror a1, QualifierKind qualifierKind1, AnnotationMirror a2, QualifierKind qualifierKind2, QualifierKind glbKind) Description copied from class:MostlyNoElementQualifierHierarchy
Returns the greatest lower bound ofa1
anda2
in cases where the glb ofqualifierKind1
andqualifierKind2
is a qualifier kind that has elements. If the glb ofqualifierKind1
andqualifierKind2
does not have elements, thenQualifierHierarchy.greatestLowerBoundShallow(AnnotationMirror, TypeMirror, AnnotationMirror, TypeMirror)
returns the correctAnnotationMirror
without calling this method.- Specified by:
greatestLowerBoundWithElements
in classMostlyNoElementQualifierHierarchy
- Parameters:
a1
- first annotationqualifierKind1
- QualifierKind fora1
a2
- second annotationqualifierKind2
- QualifierKind fora2
- Returns:
- the greatest lower bound between
a1
anda2
-