Annotation Interface StringPattern


@Target(ANNOTATION_TYPE) @Retention(CLASS) public @interface StringPattern
A pattern structure for matching strings.

If no properties are set, the default pattern matches any string.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Matches strings ending with the given suffix.
    Exact string content.
    Matches strings beginning with the given prefix.
  • Element Details

    • exact

      String exact
      Exact string content.

      For example, "foo" or "java.lang.String".

      Mutually exclusive with the following other properties defining string-exact-pattern:

      • startsWith
      • endsWith
      Default:
      ""
    • startsWith

      String startsWith
      Matches strings beginning with the given prefix.

      For example, "get" to match strings such as "getMyValue".

      Mutually exclusive with the property `exact` also defining string-prefix-pattern.

      Default:
      ""
    • endsWith

      String endsWith
      Matches strings ending with the given suffix.

      For example, "Setter" to match strings such as "myValueSetter".

      Mutually exclusive with the property `exact` also defining string-suffix-pattern.

      Default:
      ""