CommandRegistrySystemRegistryImplpublic interface SystemRegistry extends CommandRegistry
| Modifier and Type | Interface | Description |
|---|---|---|
static class |
SystemRegistry.Registeries |
Manage systemRegistry store
|
CommandRegistry.CommandSession| Modifier and Type | Method | Description |
|---|---|---|
static void |
add(SystemRegistry systemRegistry) |
Add systemRegistry to the thread map
|
void |
cleanUp() |
Delete temporary console variables and reset output streams
|
void |
close() |
Orderly close SystemRegistry.
|
CmdDesc |
commandDescription(Widgets.CmdLine line) |
Returns a command, method or syntax description for use in the JLine Widgets framework.
|
Completer |
completer() |
Returns command completer that includes also console variable and script completion.
|
Object |
consoleOption(String name) |
Return console option value
|
Object |
execute(String line) |
Execute a command, script or evaluate scriptEngine statement
|
Object |
execute(String command,
String[] args) |
Execute command with arguments
|
static SystemRegistry |
get() |
|
Collection<String> |
getPipeNames() |
|
void |
initialize(File script) |
Initialize consoleEngine environment by executing console script
|
Object |
invoke(String command,
Object... args) |
Execute command with arguments
|
void |
register(String command,
CommandRegistry subcommandRegistry) |
Register subcommand registry
|
static void |
remove() |
Remove systemRegistry of the current thread from the thread map
|
void |
setCommandRegistries(CommandRegistry... commandRegistries) |
Set command registeries
|
org.jline.terminal.Terminal |
terminal() |
|
void |
trace(boolean stack,
Exception exception) |
Print exception on terminal
|
void |
trace(Exception exception) |
Print exception on terminal
|
commandAliases, commandDescription, commandDescription, commandInfo, commandNames, compileCompleters, execute, hasCommand, invoke, namevoid setCommandRegistries(CommandRegistry... commandRegistries)
commandRegistries - command registeries used by the applicationvoid register(String command, CommandRegistry subcommandRegistry)
command - main commandsubcommandRegistry - subcommand registryvoid initialize(File script)
script - initialization scriptCollection<String> getPipeNames()
Completer completer()
CmdDesc commandDescription(Widgets.CmdLine line)
line - command line whose description to returnObject execute(String line) throws Exception
line - command line to be executedException - in case of errorvoid cleanUp()
void trace(Exception exception)
exception - exception to print on terminalvoid trace(boolean stack,
Exception exception)
stack - print stack trace if stack true otherwise messageexception - exception to be printedObject consoleOption(String name)
name - the option nameorg.jline.terminal.Terminal terminal()
Object execute(String command, String[] args) throws Exception
command - command to be executedargs - arguments of the commandException - in case of errorObject invoke(String command, Object... args) throws Exception
command - command to be executedargs - arguments of the commandException - in case of errorvoid close()
static SystemRegistry get()
static void add(SystemRegistry systemRegistry)
systemRegistry - the systemRegistrystatic void remove()
Copyright © 2020. All rights reserved.