- 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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jline.console.CommandRegistry
CommandRegistry.CommandSession
-
-
Constructor Summary
Constructors Constructor Description JlineCommandRegistry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CmdDesccommandDescription(List<String> args)Returns a command description for use in the JLine Widgets framework.List<String>commandInfo(String command)Returns a short info about command known by this registry.List<Completers.OptDesc>commandOptions(String command)static CmdDesccompileCommandDescription(String helpMessage)static List<String>compileCommandInfo(String helpMessage)static List<Completers.OptDesc>compileCommandOptions(String helpMessage)List<Completer>defaultCompleter(String command)OptionsparseOptions(String[] usage, Object[] args)-
Methods inherited from class org.jline.console.impl.AbstractCommandRegistry
alias, commandAliases, commandNames, compileCompleters, doHelpDesc, getCommandMethods, hasCommand, invoke, registerCommands, registerCommands, registeredCommand, rename, saveException
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jline.console.CommandRegistry
name
-
-
-
-
Method Detail
-
commandInfo
public List<String> commandInfo(String command)
Description copied from interface:CommandRegistryReturns 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:CommandRegistryReturns 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)
-
parseOptions
public Options parseOptions(String[] usage, Object[] args) throws Options.HelpException
- Throws:
Options.HelpException
-
compileCommandOptions
public static List<Completers.OptDesc> compileCommandOptions(String helpMessage)
-
-