Class QualifierUpperBounds
java.lang.Object
org.checkerframework.framework.type.QualifierUpperBounds
Class that computes and stores the qualifier upper bounds for type uses.
-
Constructor Summary
ConstructorDescriptionQualifierUpperBounds
(AnnotatedTypeFactory typeFactory) Creates aQualifierUpperBounds
from the given checker, using that checker to determine the annotations that are in the type hierarchy. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addType
(Class<?> type, AnnotationMirror theQual) Add default qualifier,theQual
, for the given class.void
addTypeKind
(TypeKind typeKind, AnnotationMirror theQual) Add default qualifier,theQual
, for the given TypeKind.protected AnnotationMirrorSet
getAnnotationFromElement
(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 aQualifierUpperBounds
from 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
-