@SubtypeOf(value=UnknownVal.class) @Retention(value=RUNTIME) @Target(value={TYPE_PARAMETER,TYPE_USE}) public @interface IntRange
@IntRange(from=6, to=9)
represents the four values 6, 7, 8, and 9.
If only one of the to
and from
fields is set, then the other will default to
the max/min value of the underlying type of the variable that is annotated. Note that there must
be "default" values (Long.MIN_VALUE and Long.MAX_VALUE below) even though they will be replaced
in order to prevent javac from issuing warnings when only one of the values is set by a user.