Class QualifierUpperBounds
- java.lang.Object
-
- org.checkerframework.framework.type.QualifierUpperBounds
-
public class QualifierUpperBounds extends java.lang.Object
Class that computes and stores the qualifier upper bounds for type uses.
-
-
Constructor Summary
Constructors Constructor Description QualifierUpperBounds(AnnotatedTypeFactory typeFactory)
Creates aQualifierUpperBounds
from the given checker, using that checker to determine the annotations that are in the type hierarchy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addType(java.lang.Class<?> type, javax.lang.model.element.AnnotationMirror theQual)
Add default qualifier,theQual
, for the given class.void
addTypeKind(javax.lang.model.type.TypeKind typeKind, javax.lang.model.element.AnnotationMirror theQual)
Add default qualifier,theQual
, for the given TypeKind.protected AnnotationMirrorSet
getAnnotationFromElement(javax.lang.model.element.Element element)
Returns the explicit annotations on the element.AnnotationMirrorSet
getBoundQualifiers(javax.lang.model.type.TypeMirror type)
Returns the set of qualifiers that are the upper bounds for a use of the type.
-
-
-
Constructor Detail
-
QualifierUpperBounds
public QualifierUpperBounds(AnnotatedTypeFactory typeFactory)
Creates aQualifierUpperBounds
from the given checker, using that checker to determine the annotations that are in the type hierarchy.
-
-
Method Detail
-
addTypeKind
public void addTypeKind(javax.lang.model.type.TypeKind typeKind, javax.lang.model.element.AnnotationMirror theQual)
Add default qualifier,theQual
, for the given TypeKind.
-
addType
public void addType(java.lang.Class<?> type, javax.lang.model.element.AnnotationMirror theQual)
Add default qualifier,theQual
, for the given class.
-
getBoundQualifiers
public AnnotationMirrorSet getBoundQualifiers(javax.lang.model.type.TypeMirror type)
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
protected AnnotationMirrorSet getAnnotationFromElement(javax.lang.model.element.Element element)
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
-
-