Class | Description |
---|---|
Options |
The Options class:
parses command-line options and sets fields in your program accordingly,
creates usage messages (such as printed by a
--help option), and
creates documentation suitable for a manual or manpage. |
Options.OptionGroupInfo |
Information about an option group.
|
Options.ParseResult |
The result of parsing the argument to
@Option . |
OptionsDoclet |
Generates HTML documentation of command-line options, for use in a manual or in a Javadoc class
comment.
|
Exception | Description |
---|---|
Options.ArgException |
Indicates an exception encountered during argument processing.
|
Annotation Type | Description |
---|---|
Option |
Indicates that the annotated field is set via a command-line option.
|
OptionGroup |
Indicates which
@Option -annotated fields are part of an option group — a related
set of user-visible features. |
Unpublicized |
Indicates a field that can be set by a command-line option, but that command-line option is
unpublicized: it is not included in the usage message.
|
The Options class:
The programmer does not have to write any code, only declare and document variables. For each
field that you want to set from a command-line argument, you write Javadoc and an @
Option
annotation. Then, the field is automatically set from a command-line option of the same
name, and usage messages and printed documentation are generated automatically.