Class ViewpointTestQualifierHierarchy
QualifierHierarchy
for the Viewpoint Test Checker.-
Field Summary
Fields inherited from class org.checkerframework.framework.type.NoElementQualifierHierarchy
bottoms, kindToAnnotationMirror, qualifierKindHierarchy, qualifiers, tops
Fields inherited from class org.checkerframework.framework.type.QualifierHierarchy
atypeFactory
-
Constructor Summary
ConstructorDescriptionViewpointTestQualifierHierarchy
(Collection<Class<? extends Annotation>> qualifierClasses, Elements elements, GenericAnnotatedTypeFactory<?, ?, ?, ?> atypeFactory) Creates a ViewpointTestQualifierHierarchy from the given classes. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isSubtypeQualifiers
(AnnotationMirror subAnno, AnnotationMirror superAnno) Tests whethersubQualifier
is equal to or a sub-qualifier ofsuperQualifier
, according to the type qualifier hierarchy, ignoring Java basetypes.Methods inherited from class org.checkerframework.framework.type.NoElementQualifierHierarchy
createAnnotationMirrors, createBottoms, createQualifierKindHierarchy, createTops, findAnnotationInHierarchy, findAnnotationInSameHierarchy, getBottomAnnotation, getBottomAnnotations, getPolymorphicAnnotation, getQualifierKind, getTopAnnotation, getTopAnnotations, greatestLowerBoundQualifiers, isPolymorphicQualifier, leastUpperBoundQualifiers
Methods inherited from class org.checkerframework.framework.type.QualifierHierarchy
assertSameSize, assertSameSize, canHaveEmptyAnnotationSet, getParametricQualifier, getWidth, greatestLowerBoundQualifiersOnly, greatestLowerBoundShallow, greatestLowerBoundsShallow, isParametricQualifier, isSubtypeQualifiersOnly, isSubtypeShallow, isSubtypeShallow, isSubtypeShallow, isSubtypeShallow, isValid, leastUpperBoundQualifiersOnly, leastUpperBoundShallow, leastUpperBoundsShallow, numberOfIterationsBeforeWidening, updateMappingToMutableSet, widenedUpperBound
-
Constructor Details
-
ViewpointTestQualifierHierarchy
public ViewpointTestQualifierHierarchy(Collection<Class<? extends Annotation>> qualifierClasses, Elements elements, GenericAnnotatedTypeFactory<?, ?, ?, ?> atypeFactory) Creates a ViewpointTestQualifierHierarchy from the given classes.- Parameters:
qualifierClasses
- classes of annotations that are the qualifierselements
- element utilsatypeFactory
- the associated type factory
-
-
Method Details
-
isSubtypeQualifiers
Description copied from class:QualifierHierarchy
Tests whethersubQualifier
is equal to or a sub-qualifier ofsuperQualifier
, according to the type qualifier hierarchy, ignoring Java basetypes.Clients should generally call
QualifierHierarchy.isSubtypeShallow(javax.lang.model.element.AnnotationMirror, javax.lang.model.type.TypeMirror, javax.lang.model.element.AnnotationMirror, javax.lang.model.type.TypeMirror)
. However, subtypes should generally override this method (if needed).This method behaves the same as
QualifierHierarchy.isSubtypeQualifiersOnly(AnnotationMirror, AnnotationMirror)
, which calls this method. This method is for clients inside the framework, and it hasprotected
access to prevent use by clients outside the framework. This makes it easy to find places where code outside the framework is ignoring Java basetypes -- at calls toQualifierHierarchy.isSubtypeQualifiersOnly(javax.lang.model.element.AnnotationMirror, javax.lang.model.element.AnnotationMirror)
.- Overrides:
isSubtypeQualifiers
in classNoElementQualifierHierarchy
- Parameters:
subAnno
- possible subqualifiersuperAnno
- possible superqualifier- Returns:
- true iff
subQualifier
is a subqualifier of, or equal to,superQualifier
-