1package javax.annotation;
2
3import java.lang.annotation.Documented;
4import java.lang.annotation.ElementType;
5import java.lang.annotation.Retention;
6import java.lang.annotation.RetentionPolicy;
7
8import javax.annotation.meta.TypeQualifierDefault;
9
10/**
11 * This annotation can be applied to a package, class or method to indicate that
12 * the method parameters in that element are nullable by default unless there is:
13 * <ul>
14 * <li>An explicit nullness annotation
15 * <li>The method overrides a method in a superclass (in which case the
16 * annotation of the corresponding parameter in the superclass applies)
17 * <li> there is a default parameter annotation applied to a more tightly nested
18 * element.
19 * </ul>
20 * <p>This annotation implies the same "nullness" as no annotation. However, it is different
21 * than having no annotation, as it is inherited and it can override a ParametersAreNonnullByDefault
22 * annotation at an outer scope.
23 *
24 */
25@Documented
26@Nullable
27@TypeQualifierDefault(ElementType.PARAMETER)
28@Retention(RetentionPolicy.RUNTIME)
29public @interface ParametersAreNullableByDefault {
30}
31