Options
How Options become Properties become Parameters
An Option is a tag-value (or name-value) token that is parsed from the command-line:
--filename=Input.xml --out='outDir\' --forceOverride
An Option without an explicit value is resolved to boolean: true like --forceOverride in the example above.
For each Option provided in the command-line the Commander
tries to find an appropriate OptionDescriptor
. OptionDescriptors are automatically resolved by searching for the corresponding Annotations, or they can be added manually to the Commander
(see How Commander uses Annotations) .
An OptionDescriptor
describes an Option. An OptionDescriptor determines if an Option is required, the recognized Option names and tokens, its data type, the help text and its static default value.
A group of options is called Parameters class which is finally passed to a Command.
__Parameters classes do not need annotations. A Parameters class simply acts as a container for all Options which belong to a Command. The Properties in a Parameters class take the Option values from command-line.
Last updated