- java.lang.Object
-
- com.ibm.java.diagnostics.utils.commands.BaseCommand
-
- All Implemented Interfaces:
ICommand
- Direct Known Subclasses:
BaseJdmpviewCommand
,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 String
COMMAND_FORMAT
protected PluginConfig
config
protected static String
nl
protected static String
SUBCOMMAND_FORMAT
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandDescription
addCommand(String name, String argDescription, String helpDescription)
void
addSubCommand(String cmdname, String subname, String argDescription, String help)
void
setConfig(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)
-
-