@Documented @Target(value={TYPE_USE,TYPE_PARAMETER}) @Retention(value=RUNTIME) @PolymorphicQualifier public @interface PolyAll
@PolyAll
is
equivalent to writing a polymorphic qualifier for every type system.
The @PolyAll
annotation applies to every type qualifier hierarchy for which no
explicit qualifier is written. For example, a declaration like @PolyAll @NonNull String s
is polymorphic over every type system except the nullness type system, for which the
type is fixed at @NonNull
.
Implementation note: @PolyAll
only works for a given type system if that type system
already has its own polymorphic qualifier, such as @PolyNull
or @PolyRegex
.
Therefore, every type system should define a polymorphic qualifier. Then, to support
@PolyAll
in a type system, simply add it to the list of supported type qualifiers.
PolyNull
,
PolyInterned
,
QualifierPolymorphism