Package org.jline.console.impl
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
-
-
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 CmdDesc
commandDescription(java.util.List<java.lang.String> args)
Returns a command description for use in the JLine Widgets framework.java.util.List<java.lang.String>
commandInfo(java.lang.String command)
Returns a short info about command known by this registry.java.util.List<org.jline.builtins.Completers.OptDesc>
commandOptions(java.lang.String command)
static CmdDesc
compileCommandDescription(java.lang.String helpMessage)
static java.util.List<java.lang.String>
compileCommandInfo(java.lang.String helpMessage)
static java.util.List<org.jline.builtins.Completers.OptDesc>
compileCommandOptions(java.lang.String helpMessage)
java.util.List<org.jline.reader.Completer>
defaultCompleter(java.lang.String command)
org.jline.builtins.Options
parseOptions(java.lang.String[] usage, java.lang.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 java.util.List<java.lang.String> commandInfo(java.lang.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(java.util.List<java.lang.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 java.util.List<org.jline.builtins.Completers.OptDesc> commandOptions(java.lang.String command)
-
defaultCompleter
public java.util.List<org.jline.reader.Completer> defaultCompleter(java.lang.String command)
-
parseOptions
public org.jline.builtins.Options parseOptions(java.lang.String[] usage, java.lang.Object[] args) throws org.jline.builtins.Options.HelpException
- Throws:
org.jline.builtins.Options.HelpException
-
compileCommandDescription
public static CmdDesc compileCommandDescription(java.lang.String helpMessage)
-
compileCommandOptions
public static java.util.List<org.jline.builtins.Completers.OptDesc> compileCommandOptions(java.lang.String helpMessage)
-
compileCommandInfo
public static java.util.List<java.lang.String> compileCommandInfo(java.lang.String helpMessage)
-
-