-
Notifications
You must be signed in to change notification settings - Fork 7
Mode flags
h908714124 edited this page Jun 17, 2021
·
6 revisions
An @Option
of type boolean
is interpreted as a mode flag, a.k.a nullary option.
The boolean indicates whether the flag was present on the command line.
@Option(names = { "-n", "--dry-run" })
abstract boolean dryRun();
The method must return the primitive type boolean
. Boolean
or List<Boolean>
will not work. There is no way to define a "repeatable mode flag".