Annotation Type 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
      java.lang.String endsWith
      Matches strings ending with the given suffix.
      java.lang.String exact
      Exact string content.
      java.lang.String startsWith
      Matches strings beginning with the given prefix.
    • Element Detail

      • exact

        java.lang.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

        java.lang.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

        java.lang.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:
        ""