Search in sources :

Example 11 with QualifierKind

use of org.checkerframework.framework.util.QualifierKind in project checker-framework by typetools.

the class ElementQualifierHierarchy method getBottomAnnotation.

@Override
public AnnotationMirror getBottomAnnotation(AnnotationMirror start) {
    QualifierKind kind = getQualifierKind(start);
    // All bottoms are keys for bottomsMap.
    @SuppressWarnings("nullness:assignment") @NonNull AnnotationMirror result = bottomsMap.get(kind.getBottom());
    return result;
}
Also used : AnnotationMirror(javax.lang.model.element.AnnotationMirror) NonNull(org.checkerframework.checker.nullness.qual.NonNull) RequiresNonNull(org.checkerframework.checker.nullness.qual.RequiresNonNull) QualifierKind(org.checkerframework.framework.util.QualifierKind)

Example 12 with QualifierKind

use of org.checkerframework.framework.util.QualifierKind in project checker-framework by typetools.

the class ElementQualifierHierarchy method getTopAnnotation.

@Override
public AnnotationMirror getTopAnnotation(AnnotationMirror start) {
    QualifierKind kind = getQualifierKind(start);
    // All tops are a key for topsMap.
    @SuppressWarnings("nullness:assignment") @NonNull AnnotationMirror result = topsMap.get(kind.getTop());
    return result;
}
Also used : AnnotationMirror(javax.lang.model.element.AnnotationMirror) NonNull(org.checkerframework.checker.nullness.qual.NonNull) RequiresNonNull(org.checkerframework.checker.nullness.qual.RequiresNonNull) QualifierKind(org.checkerframework.framework.util.QualifierKind)

Aggregations

QualifierKind (org.checkerframework.framework.util.QualifierKind)12 AnnotationMirror (javax.lang.model.element.AnnotationMirror)5 Nullable (org.checkerframework.checker.nullness.qual.Nullable)5 NonNull (org.checkerframework.checker.nullness.qual.NonNull)4 RequiresNonNull (org.checkerframework.checker.nullness.qual.RequiresNonNull)4 BugInCF (org.checkerframework.javacutil.BugInCF)1 TypeSystemError (org.checkerframework.javacutil.TypeSystemError)1