aboutsummaryrefslogtreecommitdiff
path: root/engine/src/core/checkers/quals/DefaultQualifiers.java
blob: e483e63e754a930cfd1454a67dfd5223abe8dc86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package checkers.quals;

import java.lang.annotation.Documented;
import static java.lang.annotation.ElementType.*;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Specifies the annotations to be included in a type without having to provide
 * them explicitly.
 *
 * This annotation permits specifying multiple default qualifiers for more
 * than one type system.  It is necessary because Java forbids multiple
 * annotations of the same name at a single location.
 *
 * Example:
 * <!-- &nbsp; is a hack that prevents @ from being the first charater on the line, which confuses Javadoc -->
 * <code><pre>
 * &nbsp; @DefaultQualifiers({
 * &nbsp;     @DefaultQualifier("NonNull"),
 * &nbsp;     @DefaultQualifier(value = "Interned", locations = ALL_EXCEPT_LOCALS),
 * &nbsp;     @DefaultQualifier("Tainted")
 * &nbsp; })
 * </pre></code>
 *
 * @see DefaultQualifier
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({CONSTRUCTOR, METHOD, FIELD, LOCAL_VARIABLE, PARAMETER, TYPE})
public @interface DefaultQualifiers {
    /** The default qualifier settings */
    DefaultQualifier[] value() default { };
}