public class TestUtil extends CmdlineGenericConsumer
| Modifier and Type | Class and Description |
|---|---|
class |
TestUtil.MakeCopy |
| Constructor and Description |
|---|
TestUtil(java.lang.String[] args) |
| 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.
|
static void |
main(java.lang.String[] args) |
java.lang.String |
optionUsage()
A short string included in the usage message to indicate
valid options.
|
public int checkKeyword(java.lang.String mainName,
int thisArg,
java.lang.String[] args)
CmdlineGenericConsumercheckKeyword in interface CmdlineConsumercheckKeyword in class CmdlineGenericConsumermainName - 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(java.lang.String mainName,
char ch,
java.lang.String arg)
CmdlineGenericConsumercheckOption in interface CmdlineConsumercheckOption in class CmdlineGenericConsumermainName - 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 boolean finalizeArgs(java.lang.String mainName)
CmdlineGenericConsumerfinalizeArgs in interface CmdlineConsumerfinalizeArgs in class CmdlineGenericConsumermainName - The name of the main class (useful for
error messages.)public void initializeArgs()
CmdlineGenericConsumerCmdlineParser will be run
before any instance variables for the extending
class are initialized.initializeArgs in interface CmdlineConsumerinitializeArgs in class CmdlineGenericConsumerpublic java.lang.String keywordUsage()
CmdlineGenericConsumerkeywordUsage in interface CmdlineConsumerkeywordUsage in class CmdlineGenericConsumerpublic java.lang.String optionUsage()
CmdlineGenericConsumeroptionUsage in interface CmdlineConsumeroptionUsage in class CmdlineGenericConsumerpublic static final void main(java.lang.String[] args)