Annotation Type DefaultQualifierInHierarchy


  • @Documented
    @Retention(RUNTIME)
    @Target(ANNOTATION_TYPE)
    public @interface DefaultQualifierInHierarchy
    Indicates that the annotated qualifier is the default qualifier in the qualifier hierarchy: it applies if the programmer writes no explicit qualifier and no other default has been specified for the location.

    Other defaults can be specified for a checker via the DefaultFor meta-annotation, which takes precedence over DefaultQualifierInHierarchy, or via org.checkerframework.framework.type.GenericAnnotatedTypeFactory#addCheckedCodeDefaults(org.checkerframework.framework.util.defaults.QualifierDefaults).

    The DefaultQualifier annotation, which targets Java code elements, takes precedence over DefaultQualifierInHierarchy.

    Each type qualifier hierarchy may have at most one qualifier marked as DefaultQualifierInHierarchy.

    See Also:
    DefaultQualifier