@Documented @Retention(value=RUNTIME) @Target(value=ANNOTATION_TYPE) @AnnotatedFor(value="nullness") public @interface SubtypeOf
QualifierHierarchy or TypeHierarchy.)
Example:
@SubtypeOf( { Nullable.class } )
public @interface NonNull {}
For the top qualifier in the qualifier hierarchy (i.e., the qualifier that is a supertype of all other qualifiers in the given hierarchy), use an empty set of values:
@SubtypeOf( {} )
public @interface Nullable {}
@SubtypeOf( {} )
public @interface MaybeAliased {}
Together, all the @SubtypeOf meta-annotations fully describe the type qualifier
hierarchy.
| Modifier and Type | Required Element and Description |
|---|---|
Class<? extends Annotation>[] |
value
An array of the supertype qualifiers of the annotated qualifier.
|
public abstract Class<? extends Annotation>[] value