Class QualifierUpperBounds
java.lang.Object
org.checkerframework.framework.type.QualifierUpperBounds
Class that computes and stores the qualifier upper bounds for type uses.
-
Constructor Summary
ConstructorsConstructorDescriptionQualifierUpperBounds(AnnotatedTypeFactory typeFactory) Creates aQualifierUpperBoundsfrom the given checker, using that checker to determine the annotations that are in the type hierarchy. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddType(Class<?> type, AnnotationMirror theQual) Add default qualifier,theQual, for the given class.voidaddTypeKind(TypeKind typeKind, AnnotationMirror theQual) Add default qualifier,theQual, for the given TypeKind.protected AnnotationMirrorSetgetAnnotationFromElement(Element element) Returns the explicit annotations on the element.getBoundQualifiers(TypeMirror type) Returns the set of qualifiers that are the upper bounds for a use of the type.
-
Constructor Details
-
QualifierUpperBounds
Creates aQualifierUpperBoundsfrom the given checker, using that checker to determine the annotations that are in the type hierarchy.
-
-
Method Details
-
addTypeKind
Add default qualifier,theQual, for the given TypeKind. -
addType
Add default qualifier,theQual, for the given class. -
getBoundQualifiers
Returns the set of qualifiers that are the upper bounds for a use of the type.- Parameters:
type- the TypeMirror- Returns:
- the set of qualifiers that are the upper bounds for a use of the type
-
getAnnotationFromElement
Returns the explicit annotations on the element. Subclass can override this behavior to add annotations.- Parameters:
element- element whose annotations to return- Returns:
- the explicit annotations on the element
-