Annotation Interface Pattern


@Target(FIELD) @Retention(RUNTIME) public @interface Pattern
Validates that a String config value matches the specified regular expression. If the value does not match, the module refuses to load naming the field and the pattern - the config file is never rewritten (D-01). The offending value itself is redacted from the refusal message when the field name looks secret-shaped (password/secret/token/credential/apikey).
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The regular expression pattern to match against.
  • Element Details

    • regex

      String regex
      The regular expression pattern to match against.