Annotation Type CLIArgument


  • @Target(FIELD)
    @Retention(RUNTIME)
    public @interface CLIArgument
    Annotation for a command line option with an argument, like "--file ".
    See Also:
    CLIArgumentParser
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String description
      A short sentence description of the option.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String argumentName
      Argument name.
      java.lang.String defaultValue
      Default value for the option.
      java.lang.String longOpt
      Long name for the option.
      boolean optional
      Set to true if the default action is inaction.
      char shortOpt
      Short name for the option.
    • Element Detail

      • description

        java.lang.String description
        A short sentence description of the option. Shown in help / usage screens.
      • argumentName

        java.lang.String argumentName
        Argument name. For example, if you want --file , then argumentName is the "filename" part. If not provided, one will be auto-generated from the field name.
        Default:
        "\u0000\u0000\u0000\u0000[NO DEFAULT]\u0000\u0000\u0000\u0000"
      • longOpt

        java.lang.String longOpt
        Long name for the option. If not provided, one will be auto-generated from the field name.
        Default:
        "\u0000\u0000\u0000\u0000[NO DEFAULT]\u0000\u0000\u0000\u0000"
      • shortOpt

        char shortOpt
        Short name for the option. If not provided, the option will not have a short name.
        Default:
        '\u0000'
      • defaultValue

        java.lang.String defaultValue
        Default value for the option. If no default is provided, the argument is required.
        Default:
        "\u0000\u0000\u0000\u0000[NO DEFAULT]\u0000\u0000\u0000\u0000"
      • optional

        boolean optional
        Set to true if the default action is inaction.
        Default:
        false