- All Known Implementing Classes:
BaseCommand
,BaseJdmpviewCommand
,CdCommand
,CloseCommand
,DeadlockCommand
,FindCommand
,FindNextCommand
,FindPtrCommand
,HeapdumpCommand
,HelpCommand
,HexdumpCommand
,InfoClassCommand
,InfoCommand
,InfoHeapCommand
,InfoJitmCommand
,InfoLockCommand
,InfoMemoryCommand
,InfoMmapCommand
,InfoProcCommand
,InfoSymCommand
,InfoSystemCommand
,InfoThreadCommand
,LogCommand
,OpenCommand
,PluginCommand
,PwdCommand
,QuitCommand
,ScrollCommand
,SetCommand
,SetHeapdumpCommand
,SetLoggingCommand
,ShowCommand
,ShowHeapdumpCommand
,ShowLoggingCommand
,SimpleRedirectorCommand
,WhatisCommand
,XCommand
,XDCommand
,XJCommand
,XKCommand
,XXCommand
public interface ICommand
-
Method Summary
Modifier and TypeMethodDescriptionIdentifies 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
run
(String command, String[] args, IContext context, PrintStream out) Executes the command
-
Method Details
-
recognises
Method used by an interactive engine to decide whether this command matches the command passed in by the user- 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
-
run
Executes the command- Parameters:
command
- Command string e.g. !j9xargs
- Arguments for commandcontext
- Context to work inout
- PrintStream to write command output on- Throws:
CommandException
- If there is any problem running the command (incorrect usage, CorruptData etc.)
-
getCommandDescriptions
Collection<String> getCommandDescriptions()- Returns:
- Strings to be inserted in help output
-
getCommandNames
Collection<String> getCommandNames()- Returns:
- Strings containing command names
-
getConfig
PluginConfig getConfig()Identifies the configuration from which this command was created.- Returns:
- configuration for this command
-