Annotation Type Regex


  • @Target(PARAMETER)
    @Retention(RUNTIME)
    public @interface Regex
    Annotation version of adding RegexPreprocessor as a preprocessor using CommandArgument.addPreprocessor(BiFunction)
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      @NonNull java.lang.String value
      Regular expression pattern
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      @NonNull java.lang.String failureCaption
      Key for the caption used to generate the failure exception.
    • Element Detail

      • value

        @NonNull java.lang.String value
        Regular expression pattern
        Returns:
        Pattern
      • failureCaption

        @NonNull java.lang.String failureCaption
        Key for the caption used to generate the failure exception. Defaults to StandardCaptionKeys.ARGUMENT_PARSE_FAILURE_REGEX
        Returns:
        Failure caption key
        Default:
        "argument.parse.failure.regex"