public class TestDownload extends Download implements CmdlineConsumer
| Constructor and Description |
|---|
TestDownload(String[] args) |
| Modifier and Type | Method and Description |
|---|---|
int |
checkKeyword(String mainName,
int thisArg,
String[] args)
Handle subclass-specific command line options and their arguments.
|
int |
checkOption(String mainName,
char ch,
String arg)
Handle subclass-specific command line options and their arguments.
|
boolean |
finalizeArgs(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.
|
String |
keywordUsage()
A short string included in the usage message to indicate
valid keywords.
|
static void |
main(String[] args) |
String |
optionUsage()
A short string included in the usage message to indicate
valid options.
|
public TestDownload(String[] args)
public int checkKeyword(String mainName, int thisArg, String[] args)
CmdlineConsumercheckKeyword in interface CmdlineConsumermainName - The name of the main class (useful for
error messages.)thisArg - The index of the current keyword.args - The full list of arguments.public int checkOption(String mainName, char ch, String arg)
CmdlineConsumercheckOption in interface CmdlineConsumermainName - 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.public String keywordUsage()
CmdlineConsumerkeywordUsage in interface CmdlineConsumerpublic String optionUsage()
CmdlineConsumeroptionUsage in interface CmdlineConsumerpublic boolean finalizeArgs(String mainName)
CmdlineConsumerfinalizeArgs in interface CmdlineConsumermainName - The name of the main class (useful for
error messages.)public void initializeArgs()
CmdlineConsumerCmdlineParser will be run
before any instance variables for the extending
class are initialized.initializeArgs in interface CmdlineConsumerpublic static final void main(String[] args)