Package org.apache.groovy.groovysh.jline
Class SystemRegistryImpl
java.lang.Object
org.apache.groovy.groovysh.jline.SystemRegistryImpl
- All Implemented Interfaces:
org.jline.builtins.ConsoleOptionGetter
,org.jline.console.CommandRegistry
,org.jline.console.SystemRegistry
Aggregate command registries.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
static enum
static class
Nested classes/interfaces inherited from interface org.jline.console.CommandRegistry
org.jline.console.CommandRegistry.CommandSession
Nested classes/interfaces inherited from interface org.jline.console.SystemRegistry
org.jline.console.SystemRegistry.Registeries
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.jline.builtins.ConfigurationPath
protected final org.jline.reader.Parser
-
Constructor Summary
ConstructorsConstructorDescriptionSystemRegistryImpl
(org.jline.reader.Parser parser, org.jline.terminal.Terminal terminal, Supplier<Path> workDir, org.jline.builtins.ConfigurationPath configPath) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCompleter
(org.jline.reader.Completer completer) void
cleanUp()
void
close()
org.jline.console.CmdDesc
commandDescription
(List<String> args) org.jline.console.CmdDesc
commandDescription
(org.jline.console.CmdLine line) commandInfo
(String command) org.jline.reader.impl.completer.SystemCompleter
org.jline.reader.Completer
org.jline.console.ConsoleEngine
consoleOption
(String name) <T> T
consoleOption
(String name, T defVal) groupCommandsInHelp
(boolean commandGroups) boolean
hasCommand
(String command) void
initialize
(File script) boolean
isCommandAlias
(String command) boolean
isCommandOrScript
(String command) boolean
isCommandOrScript
(org.jline.reader.ParsedLine line) void
Register subcommand registryvoid
rename
(SystemRegistryImpl.Pipe pipe, String name) void
renameLocal
(String command, String newName) void
setCommandRegistries
(org.jline.console.CommandRegistry... commandRegistries) void
setConsoleOption
(String name, Object value) void
setGroupCommandsInHelp
(boolean commandGroups) void
setScriptDescription
(Function<org.jline.console.CmdLine, org.jline.console.CmdDesc> scriptDescription) org.jline.terminal.Terminal
terminal()
void
void
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
invoke, name
-
Field Details
-
parser
protected final org.jline.reader.Parser parser -
configPath
protected final org.jline.builtins.ConfigurationPath configPath -
workDir
-
-
Constructor Details
-
SystemRegistryImpl
-
-
Method Details
-
rename
-
renameLocal
-
getPipeNames
- Specified by:
getPipeNames
in interfaceorg.jline.console.SystemRegistry
-
setCommandRegistries
public void setCommandRegistries(org.jline.console.CommandRegistry... commandRegistries) - Specified by:
setCommandRegistries
in interfaceorg.jline.console.SystemRegistry
-
initialize
- Specified by:
initialize
in interfaceorg.jline.console.SystemRegistry
-
commandNames
- Specified by:
commandNames
in interfaceorg.jline.console.CommandRegistry
-
commandAliases
- Specified by:
commandAliases
in interfaceorg.jline.console.CommandRegistry
-
consoleOption
- Specified by:
consoleOption
in interfaceorg.jline.builtins.ConsoleOptionGetter
- Specified by:
consoleOption
in interfaceorg.jline.console.SystemRegistry
-
consoleOption
- Specified by:
consoleOption
in interfaceorg.jline.builtins.ConsoleOptionGetter
- Specified by:
consoleOption
in interfaceorg.jline.console.SystemRegistry
-
setConsoleOption
- Specified by:
setConsoleOption
in interfaceorg.jline.console.SystemRegistry
-
register
Register subcommand registry- Specified by:
register
in interfaceorg.jline.console.SystemRegistry
- Parameters:
command
- main commandsubcommandRegistry
- subcommand registry
-
commandInfo
- Specified by:
commandInfo
in interfaceorg.jline.console.CommandRegistry
-
hasCommand
- Specified by:
hasCommand
in interfaceorg.jline.console.CommandRegistry
-
setGroupCommandsInHelp
public void setGroupCommandsInHelp(boolean commandGroups) -
groupCommandsInHelp
-
isCommandOrScript
public boolean isCommandOrScript(org.jline.reader.ParsedLine line) - Specified by:
isCommandOrScript
in interfaceorg.jline.console.SystemRegistry
-
isCommandOrScript
- Specified by:
isCommandOrScript
in interfaceorg.jline.console.SystemRegistry
-
addCompleter
public void addCompleter(org.jline.reader.Completer completer) -
compileCompleters
public org.jline.reader.impl.completer.SystemCompleter compileCompleters()- Specified by:
compileCompleters
in interfaceorg.jline.console.CommandRegistry
-
completer
public org.jline.reader.Completer completer()- Specified by:
completer
in interfaceorg.jline.console.SystemRegistry
-
commandDescription
- Specified by:
commandDescription
in interfaceorg.jline.console.CommandRegistry
-
setScriptDescription
public void setScriptDescription(Function<org.jline.console.CmdLine, org.jline.console.CmdDesc> scriptDescription) -
commandDescription
public org.jline.console.CmdDesc commandDescription(org.jline.console.CmdLine line) - Specified by:
commandDescription
in interfaceorg.jline.console.SystemRegistry
-
invoke
- Specified by:
invoke
in interfaceorg.jline.console.SystemRegistry
- Throws:
Exception
-
terminal
public org.jline.terminal.Terminal terminal()- Specified by:
terminal
in interfaceorg.jline.console.SystemRegistry
-
isCommandAlias
- Specified by:
isCommandAlias
in interfaceorg.jline.console.SystemRegistry
-
execute
- Specified by:
execute
in interfaceorg.jline.console.SystemRegistry
- Throws:
Exception
-
cleanUp
public void cleanUp()- Specified by:
cleanUp
in interfaceorg.jline.console.SystemRegistry
-
trace
- Specified by:
trace
in interfaceorg.jline.console.SystemRegistry
-
trace
- Specified by:
trace
in interfaceorg.jline.console.SystemRegistry
-
close
public void close()- Specified by:
close
in interfaceorg.jline.console.SystemRegistry
-
consoleEngine
public org.jline.console.ConsoleEngine consoleEngine()
-