Annotation Interface ArrayLenRange


An expression with this type evaluates to an array or a string whose length is in the given range. The bounds are inclusive; for example, @ArrayLenRange(from=6, to=9) represents an array or a string with four possible values for its length: 6, 7, 8, and 9.
See the Checker Framework Manual:
Constant Value Checker
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Smallest value in the range, inclusive.
    int
    Largest value in the range, inclusive.
  • Element Details

    • from

      int from
      Smallest value in the range, inclusive.
      Default:
      0
    • to

      int to
      Largest value in the range, inclusive.
      Default:
      2147483647