Annotation Interface UpperBoundFor


@Documented @Retention(RUNTIME) @Target(ANNOTATION_TYPE) public @interface UpperBoundFor
A meta-annotation applied to the declaration of a type qualifier. It specifies that the annotation should be the upper bound for
  • all uses of a particular type, and
  • all uses of a particular kind of type.
An example is the declaration

 @DefaultFor(classes=String.class)
 @interface MyAnno {}
 

The upper bound applies to every occurrence of the given classes and also to every occurrence of the given type kinds.

See the Checker Framework Manual:
Upper bound of qualifiers on uses of a given type
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Returns TypeKinds of types that get an upper bound.
    Class<?>[]
    Returns Classes that should get an upper bound.
  • Element Details

    • typeKinds

      TypeKind[] typeKinds
      Returns TypeKinds of types that get an upper bound. The meta-annotated annotation is the upper bound.
      Returns:
      TypeKinds of types that get an upper bound
      Default:
      {}
    • types

      Class<?>[] types
      Returns Classes that should get an upper bound. The meta-annotated annotation is the upper bound.
      Returns:
      Classes that get an upper bound
      Default:
      {}