Class SimpleSystemRegistryImpl

    • Constructor Detail

      • SimpleSystemRegistryImpl

        public SimpleSystemRegistryImpl​(Parser parser,
                                        Terminal terminal,
                                        java.util.function.Supplier<java.nio.file.Path> workDir,
                                        ConfigurationPath configPath)
    • Method Detail

      • setLineReader

        public void setLineReader​(LineReader lineReader)
      • consoleOption

        public <T> T consoleOption​(java.lang.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​(java.lang.String name,
                                     java.lang.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