- java.lang.Object
-
- com.ibm.java.diagnostics.utils.commands.BaseCommand
-
- All Implemented Interfaces:
ICommand
- Direct Known Subclasses:
PluginCommand,QuitCommand
public abstract class BaseCommand extends Object implements ICommand
Base command which supplies basic support.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringCOMMAND_FORMATprotected PluginConfigconfigprotected static Stringnlprotected static StringSUBCOMMAND_FORMAT
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandDescriptionaddCommand(String name, String argDescription, String helpDescription)voidaddSubCommand(String cmdname, String subname, String argDescription, String help)voidsetConfig(PluginConfig config)-
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods declared in interface com.ibm.java.diagnostics.utils.commands.ICommand
getCommandDescriptions, getCommandNames, getConfig, recognises, run
-
-
-
-
Field Detail
-
nl
protected static final String nl
-
COMMAND_FORMAT
protected static final String COMMAND_FORMAT
- See Also:
- Constant Field Values
-
SUBCOMMAND_FORMAT
protected static final String SUBCOMMAND_FORMAT
- See Also:
- Constant Field Values
-
config
protected PluginConfig config
-
-
Method Detail
-
addCommand
public CommandDescription addCommand(String name, String argDescription, String helpDescription)
- Parameters:
name- Command NameargDescription- brief description of any optional or required argumentshelpDescription- one-line description of the command argDescription should be a word describing the argument name, e.g: <address> to specify an address argument that is mandatory, or [address] to specify an address argument that is optional
-
addSubCommand
public void addSubCommand(String cmdname, String subname, String argDescription, String help)
-
setConfig
public void setConfig(PluginConfig config)
-
-