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
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected PluginConfigprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCommand(String name, String argDescription, String helpDescription) voidaddSubCommand(String cmdname, String subname, String argDescription, String help) Identifies the configuration from which this command was created.booleanrecognises(String command, IContext context) Method used by an interactive engine to decide whether this command matches the command passed in by the uservoidsetConfig(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:ICommandMethod used by an interactive engine to decide whether this command matches the command passed in by the user- Specified by:
recognisesin 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:
getCommandDescriptionsin interfaceICommand- Returns:
- Strings to be inserted in help output
-
getCommandNames
- Specified by:
getCommandNamesin interfaceICommand- Returns:
- Strings containing command names
-
getConfig
Description copied from interface:ICommandIdentifies the configuration from which this command was created. -
setConfig
-