Package org.jline.console.impl
Class SimpleSystemRegistryImpl
java.lang.Object
org.jline.console.impl.SystemRegistryImpl
org.jline.console.impl.SimpleSystemRegistryImpl
- All Implemented Interfaces:
ConsoleOptionGetter
,CommandRegistry
,SystemRegistry
Simple SystemRegistry which stores variables in the LineReader.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jline.console.impl.SystemRegistryImpl
SystemRegistryImpl.CommandData, SystemRegistryImpl.Pipe, SystemRegistryImpl.UnknownCommandException
Nested classes/interfaces inherited from interface org.jline.console.CommandRegistry
CommandRegistry.CommandSession
Nested classes/interfaces inherited from interface org.jline.console.SystemRegistry
SystemRegistry.Registeries
-
Field Summary
FieldsFields inherited from class org.jline.console.impl.SystemRegistryImpl
configPath, parser, workDir
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleSystemRegistryImpl
(Parser parser, Terminal terminal, Supplier<Path> workDir, ConfigurationPath configPath) -
Method Summary
Modifier and TypeMethodDescription<T> T
consoleOption
(String name, T defVal) Return console option valuevoid
setConsoleOption
(String name, Object value) Set console option valuevoid
setLineReader
(LineReader lineReader) Methods inherited from class org.jline.console.impl.SystemRegistryImpl
addCompleter, cleanUp, close, commandAliases, commandDescription, commandDescription, commandInfo, commandNames, compileCompleters, completer, consoleEngine, consoleOption, execute, getPipeNames, groupCommandsInHelp, hasCommand, initialize, invoke, isCommandAlias, isCommandOrScript, isCommandOrScript, register, rename, setCommandRegistries, setGroupCommandsInHelp, setScriptDescription, terminal, trace, trace
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
-
lineReader
-
-
Constructor Details
-
SimpleSystemRegistryImpl
public SimpleSystemRegistryImpl(Parser parser, Terminal terminal, Supplier<Path> workDir, ConfigurationPath configPath)
-
-
Method Details
-
setLineReader
-
consoleOption
Description copied from interface:SystemRegistry
Return console option value- Specified by:
consoleOption
in interfaceConsoleOptionGetter
- Specified by:
consoleOption
in interfaceSystemRegistry
- Overrides:
consoleOption
in classSystemRegistryImpl
- Type Parameters:
T
- option type- Parameters:
name
- the option namedefVal
- value to return if console option does not exists- Returns:
- option value
-
setConsoleOption
Description copied from interface:SystemRegistry
Set console option value- Specified by:
setConsoleOption
in interfaceSystemRegistry
- Overrides:
setConsoleOption
in classSystemRegistryImpl
- Parameters:
name
- the option namevalue
- value to assign console option
-