Class SimpleSystemRegistryImpl

java.lang.Object
org.jline.console.impl.SystemRegistryImpl
org.jline.console.impl.SimpleSystemRegistryImpl
All Implemented Interfaces:
ConsoleOptionGetter, CommandRegistry, SystemRegistry

public class SimpleSystemRegistryImpl extends SystemRegistryImpl
Simple SystemRegistry which stores variables in the LineReader.
  • Constructor Details

  • Method Details

    • setLineReader

      public void setLineReader(LineReader lineReader)
    • consoleOption

      public <T> T consoleOption(String name, T defVal)
      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 interface ConsoleOptionGetter
      Specified by:
      consoleOption in interface SystemRegistry
      Overrides:
      consoleOption in class SystemRegistryImpl
      Type Parameters:
      T - the type of the option value
      Parameters:
      name - the name of the option to retrieve
      defVal - 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

      public void setConsoleOption(String name, Object value)
      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 interface SystemRegistry
      Overrides:
      setConsoleOption in class SystemRegistryImpl
      Parameters:
      name - the name of the option to set
      value - the value to assign to the option