Annotation Interface AllowedRawValues


@Retention(RUNTIME) @Target(FIELD) public @interface AllowedRawValues
Annotation that marks that the option/arguments are restricted to a given set of raw string values

If you instead want to limit values to be in a set of parsed values then you should use the AllowedValues annotation instead. However for simple use cases this restriction will always be more efficient.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    If provided restricts the values for the option to the given set of values
    boolean
    If true the case on allowedValues() is ignored
    The locale used for comparisons
  • Element Details

    • allowedValues

      String[] allowedValues
      If provided restricts the values for the option to the given set of values
      Returns:
      Allowed values
      Default:
      {}
    • ignoreCase

      boolean ignoreCase
      If true the case on allowedValues() is ignored
      Returns:
      Ignore case
      Default:
      false
    • locale

      String locale
      The locale used for comparisons
      Returns:
      Locale BCP47 tag
      Default:
      "en"