public interface CmdlineConsumer
| Modifier and Type | Method and Description |
|---|---|
int |
checkKeyword(java.lang.String mainName,
int thisArg,
java.lang.String[] args)
Handle subclass-specific command line options and their arguments.
|
int |
checkOption(java.lang.String mainName,
char ch,
java.lang.String arg)
Handle subclass-specific command line options and their arguments.
|
boolean |
finalizeArgs(java.lang.String mainName)
Validate arguments after argument parsing has finished.
|
void |
initializeArgs()
Method used to initialize any instance variables which may be
changed by a cmdline option.
|
java.lang.String |
keywordUsage()
A short string included in the usage message to indicate
valid keywords.
|
java.lang.String |
optionUsage()
A short string included in the usage message to indicate
valid options.
|
void initializeArgs()
CmdlineParser will be run
before any instance variables for the extending
class are initialized.int checkOption(java.lang.String mainName,
char ch,
java.lang.String arg)
mainName - The name of the main class (useful for
error messages.)ch - Option character. If -a is specified
on the command line, 'a' would be passed to
this method.)arg - The argument associated with this option.java.lang.String optionUsage()
int checkKeyword(java.lang.String mainName,
int thisArg,
java.lang.String[] args)
mainName - The name of the main class (useful for
error messages.)thisArg - The index of the current keyword.args - The full list of arguments.java.lang.String keywordUsage()
boolean finalizeArgs(java.lang.String mainName)
mainName - The name of the main class (useful for
error messages.)