Annotation Interface ExactLength


@Retention(RUNTIME) @Target(FIELD) public @interface ExactLength
Annotation that marks that an options value is restricted to being an exact length

If you simply wish to require that an option have a minimum length then use MinLength instead, similarly MaxLength for maximum length. Alternatively for a range of lengths you can use LengthRange.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    Exact required length in characters
  • Element Details

    • length

      int length
      Exact required length in characters
      Returns:
      Exact length