Annotation Type Pattern


  • @Retention(RUNTIME)
    @Target(FIELD)
    public @interface Pattern
    An annotation that indicates that an options raw values must match a given regular expression
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String description
      Provides a description describing the intent of the regular expression, this is often more helpful to end users than an error that their input did not match a regular expression when they may not understand regular expressions
      int flags
      The flags for the regular expression
      java.lang.String pattern
      The regular expression that must be matched
    • Element Detail

      • pattern

        java.lang.String pattern
        The regular expression that must be matched
        Returns:
        Pattern
        Default:
        ".*"
      • flags

        int flags
        The flags for the regular expression
        Returns:
        Flags
        Default:
        0
      • description

        java.lang.String description
        Provides a description describing the intent of the regular expression, this is often more helpful to end users than an error that their input did not match a regular expression when they may not understand regular expressions
        Returns:
        Description
        Default:
        ""