@SubtypeOf(value=LessThanUnknown.class) @Retention(value=RUNTIME) @Target(value={TYPE_PARAMETER,TYPE_USE}) public @interface LessThan
If an expression's type has this annotation, then at run time, the expression evaluates to a value that is less than the value of the expression in the annotation.
@LessThan("end + 1")
is equivalent to @LessThanOrEqual("end")
.
Subtyping:
@LessThan({"a", "b"}) <: @LessThan({"a"})
@LessThan({"a", "b"})
is not related to @LessThan({"a", "c"})
.
Modifier and Type | Required Element and Description |
---|---|
java.lang.String[] |
value
The annotated expression's value is less than this expression.
|
public abstract java.lang.String[] value
The expressions in value
may be addition/subtraction of any number of Java
expressions. For example, @LessThan(value = "x + y + 2"
}.
The expression in value
must be final or constant or the addition/subtract of
final or constant expressions.