Annotation Interface 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
GenericAnnotatedTypeFactory.addCheckedCodeDefaults()
. Also, the CLIMB-to-top rule applies unless
explicitly overruled.
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:
- See the Checker Framework Manual:
- The effective qualifier on a type (defaults and
inference), Default qualifiers for unannotated types