The name of an option is the name that a user must type on the command line to specify the option when running the subcommand.
The name of each option that you add in your implementation of an asadmin subcommand can have a long form and a short form. When running the subcommand, the user specifies the long form and the short form as follows:
The short form of an option name has a single dash (-) followed by a single character.
The long form of an option name has two dashes (--) followed by an option word.
For example, the short form and the long form of the name of the option for specifying terse output are as follows:
Short form: -m
Long form: --monitor
Option names are case-sensitive.
To specify the long form of an option name, set the name element of the @Param annotation to a string that specifies the name. If you do not set this element, the default name depends on how you represent the option.
If you represent the option as a field, the default name is the field name.
If you represent the option as the property of a JavaBeans specification setter method, the default name is the property name from the setter method name. For example, if the setter method setPassword is associated with an option, the property name and the option name are both password.
To specify the short form of an option name, set the shortName element of the @Param annotation to a single character that specifies the short form of the parameter. The user can specify this character instead of the full parameter name, for example -m instead of --monitor. If you do not set this element, the option has no short form.