Package org.jline.console.impl
Class SimpleSystemRegistryImpl
java.lang.Object
org.jline.console.impl.SystemRegistryImpl
org.jline.console.impl.SimpleSystemRegistryImpl
- All Implemented Interfaces:
org.jline.builtins.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
Fields inherited from class org.jline.console.impl.SystemRegistryImpl
configPath, parser, workDir
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleSystemRegistryImpl
(org.jline.reader.Parser parser, org.jline.terminal.Terminal terminal, Supplier<Path> workDir, org.jline.builtins.ConfigurationPath configPath) -
Method Summary
Modifier and TypeMethodDescription<T> T
consoleOption
(String name, T defVal) Returns the value of a console option with a default value if the option doesn't exist.void
setConsoleOption
(String name, Object value) Sets the value of a console option.void
setLineReader
(org.jline.reader.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
-
Constructor Details
-
SimpleSystemRegistryImpl
-
-
Method Details
-
setLineReader
public void setLineReader(org.jline.reader.LineReader lineReader) -
consoleOption
Description copied from interface:SystemRegistry
Returns the value of a console option with a default value if the option doesn't exist.This method retrieves the value of the console option with the specified name, returning a default value if the option doesn't exist. Console options are used to configure the behavior of the console and its components.
- Specified by:
consoleOption
in interfaceorg.jline.builtins.ConsoleOptionGetter
- Specified by:
consoleOption
in interfaceSystemRegistry
- Overrides:
consoleOption
in classSystemRegistryImpl
- Type Parameters:
T
- the type of the option value- Parameters:
name
- the name of the option to retrievedefVal
- the default value to return if the option doesn't exist- Returns:
- the value of the option, or the default value if the option doesn't exist
-
setConsoleOption
Description copied from interface:SystemRegistry
Sets the value of a console option.This method sets the value of the console option with the specified name. Console options are used to configure the behavior of the console and its components.
- Specified by:
setConsoleOption
in interfaceSystemRegistry
- Overrides:
setConsoleOption
in classSystemRegistryImpl
- Parameters:
name
- the name of the option to setvalue
- the value to assign to the option
-