Class BaseCommand
java.lang.Object
com.ibm.java.diagnostics.utils.commands.BaseCommand
- All Implemented Interfaces:
ICommand
- Direct Known Subclasses:
BaseJdmpviewCommand
,PluginCommand
,QuitCommand
Base command which supplies basic support.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected PluginConfig
protected static final String
protected static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddCommand
(String name, String argDescription, String helpDescription) void
addSubCommand
(String cmdname, String subname, String argDescription, String help) Identifies the configuration from which this command was created.boolean
recognises
(String command, IContext context) Method used by an interactive engine to decide whether this command matches the command passed in by the uservoid
setConfig
(PluginConfig config)
-
Field Details
-
nl
-
COMMAND_FORMAT
- See Also:
-
SUBCOMMAND_FORMAT
- See Also:
-
config
-
-
Constructor Details
-
BaseCommand
protected BaseCommand()
-
-
Method Details
-
addCommand
- 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
-
recognises
Description copied from interface:ICommand
Method used by an interactive engine to decide whether this command matches the command passed in by the user- Specified by:
recognises
in interfaceICommand
- Parameters:
command
- Command string entered by user. e.g. !j9x or info classcontext
- Current context- Returns:
- True if this command object can process the supplied command, commands should not assume that returning true will guarantee a subsequent invocation
-
getCommandDescriptions
- Specified by:
getCommandDescriptions
in interfaceICommand
- Returns:
- Strings to be inserted in help output
-
getCommandNames
- Specified by:
getCommandNames
in interfaceICommand
- Returns:
- Strings containing command names
-
getConfig
Description copied from interface:ICommand
Identifies the configuration from which this command was created. -
setConfig
-