@Documented @Target(value=ANNOTATION_TYPE) @Retention(value=RUNTIME) public @interface PolymorphicQualifier
Any method written using a polymorphic type qualifier conceptually has two or more versions — one version for each qualifier in the qualifier hierarchy. In each version of the method, all instances of the polymorphic type qualifier are replaced by one of the other type qualifiers.
Modifier and Type | Optional Element and Description |
---|---|
Class<? extends Annotation> |
value
Usually, you can write
@PolymorphicQualifier without an
argument. |
public abstract Class<? extends Annotation> value
@PolymorphicQualifier
without an
argument. When multiple type hierarchies are supported by a single
type system, then each polymorphic qualifier needs to indicate which
sub-hierarchy it belongs to. Do so by passing a qualifier from the
given hierarchy, by convention the top qualifier.