Annotation Interface Flag


Annotation to specify flags for command arguments. This annotation can be used multiple times on the same method.

The value() method holds the list of flags, and the prefix() method defines the default prefix for the flags, which is -- by default.

The Flag.FlagContainer is a container annotation that allows the Flag annotation to be repeatable on methods.

Author:
Despical

Created at 20.09.2024

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Container annotation for holding multiple Flag annotations on the same method.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Specifies the list of flag values.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specifies the prefix for the flags.
  • Element Details

    • value

      String[] value
      Specifies the list of flag values.
      Returns:
      an array of flag values
    • prefix

      String prefix
      Specifies the prefix for the flags. Default is "--".
      Returns:
      the flag prefix
      Default:
      "--"