Home | History | Annotate | Download | only in annotation
      1 package javax.annotation;
      2 
      3 import java.lang.annotation.Documented;
      4 import java.lang.annotation.Retention;
      5 import java.lang.annotation.RetentionPolicy;
      6 
      7 import javax.annotation.meta.TypeQualifierNickname;
      8 import javax.annotation.meta.When;
      9 
     10 /**
     11  * Used to annotate a value that may be either negative or nonnegative, and
     12  * indicates that uses of it should check for
     13  * negative values before using it in a way that requires the value to be
     14  * nonnegative, and check for it being nonnegative before using it in a way that
     15  * requires it to be negative.
     16  */
     17 
     18 @Documented
     19 @TypeQualifierNickname
     20 @Nonnegative(when = When.MAYBE)
     21 @Retention(RetentionPolicy.RUNTIME)
     22 public @interface CheckForSigned {
     23 
     24 }
     25