📜  Apache Commons CLI-选项属性

📅  最后修改于: 2020-11-18 08:00:39             🧑  作者: Mango


Option对象用于表示传递给命令行程序的Option。以下是Option对象拥有的各种属性。

Sr.No. Name (Type) & Description
1

opt (String)

Identification string of the Option.

2

longOpt (String)

Alias and more descriptive identification string.

3

description (String)

Description of the function of the option.

4

required (boolean)

Flag to check whether the option must appear on the command line.

5

arg (boolean)

Flag to check whether the option takes an argument.

6

args (boolean)

Flag to check whether the option takes more than one argument.

7

optionalArg (boolean)

Flag to check whether the option’s argument is optional.

8

argName (String)

Name of the argument value for the usage statement.

9

valueSeparator (char)

The character value used to split the argument string.

10

type (Object)

Argument type.

11

value (String)

Option value.

12

values (String[])

Values of the option.