@Documented @Retention(value=RUNTIME) @Target(value={TYPE,PACKAGE}) public @interface HasQualifierParameter
HasQualifierParameter on a package is the same as writing it on each class in
that package.
Writing @HasQualifierParameter on a type declaration has two effects.
@HasQualifierParameter
class StringBuffer { ... }
Then @Tainted StringBuffer is unrelated to @Untainted StringBuffer.
The type hierarchy looks like this:
@Tainted Object
/ | \
/ | @Tainted Date
/ | |
/ | |
/ @Untainted Object |
/ | \ |
@Tainted StringBuffer | @Untainted Date
| |
| @Untainted StringBuffer
| |
@Tainted MyStringBuffer |
|
@Untainted MyStringBuffer
This annotation may not be written on the same class as NoQualifierParameter for the
same hierarchy.
When @HasQualifierParameter is written on a package, it is equivalent to writing it on
each class in that package with the same arguments, including classes in sub-packages. It can be
disabled on a specific class by writing @NoQualifierParameter on that class.
NoQualifierParameter| Modifier and Type | Required Element and Description |
|---|---|
Class<? extends Annotation>[] |
value
Class of the top qualifier for the hierarchy for which this class has a qualifier parameter.
|
public abstract Class<? extends Annotation>[] value