OptionDeclarer
as a facade, forwarding calls to an
OptionParser
instance.
Note that although this is an interface, the returned values of calls are concrete jopt-simple classes.
OptionParser
Modifier and Type | Method and Description |
---|---|
public OptionSpecBuilder | |
public OptionSpecBuilder | Returns: an object that can be used to flesh out more detail about the optionthe option to recognize option, String a string that describes the purpose of the option. This is used when generating help
information about the parser. description)Tells the parser to recognize the given option. |
public OptionSpecBuilder | Returns: an object that can be used to flesh out more detail about the optionsthe options to recognize and treat as synonymous options)Tells the parser to recognize the given options, and treat them as synonymous. |
public OptionSpecBuilder | Returns: an object that can be used to flesh out more detail about the optionsthe options to recognize and treat as synonymous options, String a string that describes the purpose of the option. This is used when generating help
information about the parser. description)Tells the parser to recognize the given options, and treat them as synonymous. |
public void | |
public NonOptionArgumentSpec | Returns: an object that can be used to flesh out more detail about the non-option argumentsGives an object that represents an access point for non-option arguments on a command line. |
public NonOptionArgumentSpec | Returns: an object that can be used to flesh out more detail about the non-option argumentsa string that describes the purpose of the non-option arguments. This is used when generating
help information about the parser. description)Gives an object that represents an access point for non-option arguments on a command line. |
public void | posixlyCorrect(boolean
true if the parser should behave "POSIX-ly correct"-lyTells the parser whether or not to behave "POSIX-ly correct"-ly. |
public void | recognizeAlternativeLongOptions(boolean
true if the parser is to recognize the special style of long optionsTells the parser either to recognize or ignore |
accepts | back to summary |
---|---|
public OptionSpecBuilder accepts(String option) Tells the parser to recognize the given option. This method returns an instance of
If no methods are invoked on the returned
|
accepts | back to summary |
---|---|
public OptionSpecBuilder accepts(String option, String description) Tells the parser to recognize the given option.
|
acceptsAll | back to summary |
---|---|
public OptionSpecBuilder acceptsAll(List<String> options) Tells the parser to recognize the given options, and treat them as synonymous.
|
acceptsAll | back to summary |
---|---|
public OptionSpecBuilder acceptsAll(List<String> options, String description) Tells the parser to recognize the given options, and treat them as synonymous.
|
allowsUnrecognizedOptions | back to summary |
---|---|
public void allowsUnrecognizedOptions() Tells the parser to treat unrecognized options as non-option arguments. If not called, then the parser raises an |
nonOptions | back to summary |
---|---|
public NonOptionArgumentSpec Gives an object that represents an access point for non-option arguments on a command line.
|
nonOptions | back to summary |
---|---|
public NonOptionArgumentSpec Gives an object that represents an access point for non-option arguments on a command line.
|
posixlyCorrect | back to summary |
---|---|
public void posixlyCorrect(boolean setting) Tells the parser whether or not to behave "POSIX-ly correct"-ly.
|
recognizeAlternativeLongOptions | back to summary |
---|---|
public void recognizeAlternativeLongOptions(boolean recognize) Tells the parser either to recognize or ignore
|