Class ViewpointTestQualifierHierarchy
QualifierHierarchy for the Viewpoint Test Checker.-
Field Summary
Fields inherited from class org.checkerframework.framework.type.NoElementQualifierHierarchy
bottoms, kindToAnnotationMirror, qualifierKindHierarchy, qualifiers, topsFields inherited from class org.checkerframework.framework.type.QualifierHierarchy
atypeFactory -
Constructor Summary
ConstructorsConstructorDescriptionViewpointTestQualifierHierarchy(Collection<Class<? extends Annotation>> qualifierClasses, Elements elements, GenericAnnotatedTypeFactory<?, ?, ?, ?> atypeFactory) Creates a ViewpointTestQualifierHierarchy from the given classes. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisSubtypeQualifiers(AnnotationMirror subAnno, AnnotationMirror superAnno) Tests whethersubQualifieris 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, leastUpperBoundQualifiersMethods 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:QualifierHierarchyTests whethersubQualifieris 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 hasprotectedaccess 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:
isSubtypeQualifiersin classNoElementQualifierHierarchy- Parameters:
subAnno- possible subqualifiersuperAnno- possible superqualifier- Returns:
- true iff
subQualifieris a subqualifier of, or equal to,superQualifier
-