diff options
Diffstat (limited to 'ri/src/main/java/javax/annotation/ParametersAreNonnullByDefault.java')
-rw-r--r-- | ri/src/main/java/javax/annotation/ParametersAreNonnullByDefault.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ri/src/main/java/javax/annotation/ParametersAreNonnullByDefault.java b/ri/src/main/java/javax/annotation/ParametersAreNonnullByDefault.java new file mode 100644 index 0000000..6424b87 --- /dev/null +++ b/ri/src/main/java/javax/annotation/ParametersAreNonnullByDefault.java @@ -0,0 +1,27 @@ +package javax.annotation; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.annotation.meta.TypeQualifierDefault; + +/** + * This annotation can be applied to a package, class or method to indicate that + * the method parameters in that element are nonnull by default unless there is: + * <ul> + * <li>An explicit nullness annotation + * <li>The method overrides a method in a superclass (in which case the + * annotation of the corresponding parameter in the superclass applies) + * <li> there is a default parameter annotation applied to a more tightly nested + * element. + * </ul> + * + */ +@Documented +@Nonnull +@TypeQualifierDefault(ElementType.PARAMETER) +@Retention(RetentionPolicy.RUNTIME) +public @interface ParametersAreNonnullByDefault { +} |