Module openj9.dtfj

Interface ICommand

    • Method Detail

      • recognises

        boolean recognises​(String command,
                           IContext context)
        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 class
        context - 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

        void run​(String command,
                 String[] args,
                 IContext context,
                 PrintStream out)
          throws CommandException
        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.)
      • 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