summaryrefslogtreecommitdiffstats
path: root/ri/src/main/java/javax/annotation/CheckForSigned.java
diff options
context:
space:
mode:
Diffstat (limited to 'ri/src/main/java/javax/annotation/CheckForSigned.java')
-rw-r--r--ri/src/main/java/javax/annotation/CheckForSigned.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/ri/src/main/java/javax/annotation/CheckForSigned.java b/ri/src/main/java/javax/annotation/CheckForSigned.java
new file mode 100644
index 0000000..f3bc597
--- /dev/null
+++ b/ri/src/main/java/javax/annotation/CheckForSigned.java
@@ -0,0 +1,24 @@
+package javax.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+import javax.annotation.meta.TypeQualifierNickname;
+import javax.annotation.meta.When;
+
+/**
+ * Used to annotate a value that may be either negative or nonnegative, and
+ * indicates that uses of it should check for
+ * negative values before using it in a way that requires the value to be
+ * nonnegative, and check for it being nonnegative before using it in a way that
+ * requires it to be negative.
+ */
+
+@Documented
+@TypeQualifierNickname
+@Nonnegative(when = When.MAYBE)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface CheckForSigned {
+
+}