Annotation Interface Optional


@Target(PARAMETER) @Retention(CLASS) public @interface Optional
Annotation marking a command parameter as optional. When omitted by the caller, the parameter resolves to the specified default value.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The default value (as a String) when the argument is omitted.
  • Element Details

    • value

      String value
      The default value (as a String) when the argument is omitted.
      Returns:
      the default value
      Default:
      ""