Annotation Type 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
      java.lang.String[] allowedValues
      If provided restricts the values for the option to the given set of values
      boolean ignoreCase
      If true the case on allowedValues() is ignored
      java.lang.String locale
      The locale used for comparisons
    • Element Detail

      • allowedValues

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

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