Class QualifierUpperBounds

java.lang.Object
org.checkerframework.framework.type.QualifierUpperBounds

public class QualifierUpperBounds extends Object
Class that computes and stores the qualifier upper bounds for type uses.
  • Constructor Details

    • QualifierUpperBounds

      public QualifierUpperBounds(AnnotatedTypeFactory typeFactory)
      Creates a QualifierUpperBounds from the given checker, using that checker to determine the annotations that are in the type hierarchy.
  • Method Details

    • addTypeKind

      public void addTypeKind(TypeKind typeKind, AnnotationMirror theQual)
      Add default qualifier, theQual, for the given TypeKind.
    • addType

      public void addType(Class<?> type, AnnotationMirror theQual)
      Add default qualifier, theQual, for the given class.
    • getBoundQualifiers

      public AnnotationMirrorSet getBoundQualifiers(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(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