Annotation Type PolymorphicQualifier


  • @Documented
    @Retention(RUNTIME)
    @Target(ANNOTATION_TYPE)
    @AnnotatedFor("nullness")
    public @interface PolymorphicQualifier
    A meta-annotation that indicates that an annotation is a polymorphic type qualifier.

    Any method written using a polymorphic type qualifier conceptually has two or more versions — one version for each qualifier in the qualifier hierarchy. In each version of the method, all instances of the polymorphic type qualifier are replaced by one of the other type qualifiers.

    See the Checker Framework Manual:
    Qualifier polymorphism
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.Class<? extends java.lang.annotation.Annotation> value
      Indicates which type system this annotation refers to (optional, and usually unnecessary).
    • Element Detail

      • value

        java.lang.Class<? extends java.lang.annotation.Annotation> value
        Indicates which type system this annotation refers to (optional, and usually unnecessary). When multiple type hierarchies are supported by a single type system, then each polymorphic qualifier needs to indicate which sub-hierarchy it belongs to. Do so by passing the top qualifier from the given hierarchy.
        Returns:
        the top qualifier in the hierarchy of this qualifier
        Default:
        java.lang.annotation.Annotation.class