Annotation Interface ParametricTypeVariableUseQualifier


@Documented @Retention(RUNTIME) @Target(ANNOTATION_TYPE) @AnnotatedFor("nullness") public @interface ParametricTypeVariableUseQualifier
A meta-annotation that indicates that an annotation can be used on a type variable use to explicitly indicate that the type variable is parametric in that type hierarchy.

This is useful in combination with defaults for TypeUseLocation.TYPE_VARIABLE_USE, as it provides a way to have a default qualifier that expresses parametricity, which is usually expressed by the absence of an annotation on the type variable use.

An annotation meta-annotated with ParametricTypeVariableUseQualifier will usually not be written explicitly in source code.

This annotation is currently only for documentation, but will in the future also be used for automatic support for parametric type variable use qualifiers.

  • Optional Element Summary

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

    • value

      Class<? extends 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 parametric 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