Class InitializationParentAnnotatedTypeFactory.InitializationQualifierHierarchy
- java.lang.Object
-
- org.checkerframework.framework.type.QualifierHierarchy
-
- org.checkerframework.framework.type.ElementQualifierHierarchy
-
- org.checkerframework.framework.type.MostlyNoElementQualifierHierarchy
-
- org.checkerframework.checker.initialization.InitializationParentAnnotatedTypeFactory.InitializationQualifierHierarchy
-
- Enclosing class:
- InitializationParentAnnotatedTypeFactory
protected class InitializationParentAnnotatedTypeFactory.InitializationQualifierHierarchy extends MostlyNoElementQualifierHierarchy
TheQualifierHierarchy
for the initialization type system.
-
-
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
Constructors Modifier Constructor Description protected
InitializationQualifierHierarchy()
Create an InitializationQualifierHierarchy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.lang.model.element.AnnotationMirror
greatestLowerBoundWithElements(javax.lang.model.element.AnnotationMirror anno1, QualifierKind qual1, javax.lang.model.element.AnnotationMirror anno2, QualifierKind qual2, QualifierKind glbKind)
Returns the greatest lower bound ofa1
anda2
in cases where the glb ofqualifierKind1
andqualifierKind2
is a qualifier kind that has elements.boolean
isSubtypeWithElements(javax.lang.model.element.AnnotationMirror subAnno, QualifierKind subKind, javax.lang.model.element.AnnotationMirror superAnno, QualifierKind superKind)
Returns true ifsubAnno
is a subtype ofsuperAnno
.protected javax.lang.model.element.AnnotationMirror
leastUpperBoundWithElements(javax.lang.model.element.AnnotationMirror anno1, QualifierKind qual1, javax.lang.model.element.AnnotationMirror anno2, QualifierKind qual2, QualifierKind lubKind)
Returns the least upper bound ofa1
anda2
in cases where the lub ofqualifierKind1
andqualifierKind2
is a qualifier kind that has elements.protected javax.lang.model.type.TypeMirror
lubTypeFrame(javax.lang.model.type.TypeMirror a, javax.lang.model.type.TypeMirror b)
Returns the least upper bound of two Java basetypes (without annotations).-
Methods inherited from class org.checkerframework.framework.type.MostlyNoElementQualifierHierarchy
greatestLowerBoundQualifiers, isSubtypeQualifiers, leastUpperBoundQualifiers
-
Methods inherited from class org.checkerframework.framework.type.ElementQualifierHierarchy
createBottomsMap, createElementlessQualifierMap, createQualifierKindHierarchy, 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
-
-
-
-
Method Detail
-
isSubtypeWithElements
public boolean isSubtypeWithElements(javax.lang.model.element.AnnotationMirror subAnno, QualifierKind subKind, javax.lang.model.element.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 javax.lang.model.element.AnnotationMirror leastUpperBoundWithElements(javax.lang.model.element.AnnotationMirror anno1, QualifierKind qual1, javax.lang.model.element.AnnotationMirror anno2, QualifierKind qual2, 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:
anno1
- first annotationqual1
- QualifierKind fora1
anno2
- second annotationqual2
- QualifierKind fora2
lubKind
- the kind of the lub ofqualifierKind1
andqualifierKind2
- Returns:
- the least upper bound of
a1
anda2
-
lubTypeFrame
protected javax.lang.model.type.TypeMirror lubTypeFrame(javax.lang.model.type.TypeMirror a, javax.lang.model.type.TypeMirror b)
Returns the least upper bound of two Java basetypes (without annotations).- Parameters:
a
- the first argumentb
- the second argument- Returns:
- the lub of the two arguments
-
greatestLowerBoundWithElements
protected javax.lang.model.element.AnnotationMirror greatestLowerBoundWithElements(javax.lang.model.element.AnnotationMirror anno1, QualifierKind qual1, javax.lang.model.element.AnnotationMirror anno2, QualifierKind qual2, 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:
anno1
- first annotationqual1
- QualifierKind fora1
anno2
- second annotationqual2
- QualifierKind fora2
- Returns:
- the greatest lower bound between
a1
anda2
-
-