@Documented
@Retention(value=RUNTIME)
@Target(value=ANNOTATION_TYPE)
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 |
|---|---|
java.lang.Class<? extends java.lang.annotation.Annotation>[] |
value
An array of the supertype qualifiers of the annotated qualifier.
|