public class CliCommandOption extends Object
Modifier and Type | Field and Description |
---|---|
static CliCommandOption |
POSITIONAL_ARG_COMPLETION
Special constant for use with
CompleterService , which indicates a "meta-option" which is really
the first non-option argument. |
Constructor and Description |
---|
CliCommandOption(String opt,
String longOpt,
boolean hasArg,
String description,
boolean required) |
Modifier and Type | Method and Description |
---|---|
String |
getDescription() |
String |
getLongOpt() |
String |
getOpt() |
boolean |
hasArg() |
boolean |
isRequired() |
public static final CliCommandOption POSITIONAL_ARG_COMPLETION
CompleterService
, which indicates a "meta-option" which is really
the first non-option argument. Use this constant if you are implementing a command which takes a
non-option argument and for which you intend to provide tab completions.public CliCommandOption(String opt, String longOpt, boolean hasArg, String description, boolean required)
opt
- the short-option, ex. in the case of "-h", this should be "h"longOpt
- the long-option, ex. in the case of "--help", this should be "help"hasArg
- defines whether or not this option expects an argumentdescription
- a description of what the option doesrequired
- defines whether or not this option is optional or must be included in a command invocationCopyright © 2017. All rights reserved.