Annotation Interface MatchesRegex


An annotation indicating the possible values for a String type. The annotation's arguments are Java regular expressions. If an expression's type has this annotation, then at run time, the expression evaluates to a string that matches at least one of the regular expressions. Matching is via the java.lang.String#matches method, which matches against the entire string (it does not look for a match against a substring).
See the Checker Framework Manual:
Constant Value Checker
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    A set of Java regular expressions.
  • Element Details

    • value

      String[] value
      A set of Java regular expressions.
      Returns:
      the regular expressions