Class HelpCommand

All Implemented Interfaces:
ICommand

public class HelpCommand extends BaseJdmpviewCommand
Prints out either a help summary for all commands in this context or forwards the request onto a particular command for a detailed output. Note that the context command is a 'pseudo-command' in that it is what controls switching contexts and so is never actually in the list of commands available for the current context. The help entries for the context command are therefore added manually.
  • Constructor Details

    • HelpCommand

      public HelpCommand()
  • Method Details

    • run

      public void run(String command, String[] args, IContext context, PrintStream out) throws CommandException
      Description copied from interface: ICommand
      Executes the command
      Parameters:
      command - Command string e.g. !j9x
      args - Arguments for command
      context - Context to work in
      out - PrintStream to write command output on
      Throws:
      CommandException - If there is any problem running the command (incorrect usage, CorruptData etc.)
    • printDetailedHelp

      public void printDetailedHelp(PrintStream out)
      Description copied from class: BaseJdmpviewCommand
      Print detailed help for a given command
      Specified by:
      printDetailedHelp in class BaseJdmpviewCommand
      Parameters:
      out - stream to write the output to