Class JlineCommandRegistry

java.lang.Object
org.jline.console.impl.AbstractCommandRegistry
org.jline.console.impl.JlineCommandRegistry
All Implemented Interfaces:
CommandRegistry
Direct Known Subclasses:
Builtins, ConsoleEngineImpl, DefaultPrinter

public abstract class JlineCommandRegistry extends AbstractCommandRegistry
CommandRegistry common methods for JLine commands that are using HelpException.
Author:
Matti Rinta-Nikkola
  • Constructor Details

    • JlineCommandRegistry

      public JlineCommandRegistry()
  • Method Details

    • commandInfo

      public List<String> commandInfo(String command)
      Description copied from interface: CommandRegistry
      Returns a short info about command known by this registry.
      Parameters:
      command - the command name
      Returns:
      a short info about command
    • commandDescription

      public CmdDesc commandDescription(List<String> args)
      Description copied from interface: CommandRegistry
      Returns a command description for use in the JLine Widgets framework. Default method must be overridden to return sub command descriptions.
      Parameters:
      args - command (args[0]) and its arguments
      Returns:
      command description for JLine TailTipWidgets to be displayed in the terminal status bar.
    • commandOptions

      public List<Completers.OptDesc> commandOptions(String command)
    • defaultCompleter

      public List<Completer> defaultCompleter(String command)
    • parseOptions

      public Options parseOptions(String[] usage, Object[] args) throws Options.HelpException
      Throws:
      Options.HelpException
    • compileCommandDescription

      public static CmdDesc compileCommandDescription(String helpMessage)
    • compileCommandOptions

      public static List<Completers.OptDesc> compileCommandOptions(String helpMessage)
    • compileCommandInfo

      public static List<String> compileCommandInfo(String helpMessage)