class ShellCommandHandler : ShellCommands
This class allows for interacting with an interactive shell by invoking external methods, as well as retrieving user input.
ShellCommandHandler(renderer: Renderer)
This class allows for interacting with an interactive shell by invoking external methods, as well as retrieving user input. |
val renderer: Renderer |
fun getBooleanInput(promptString: String): Boolean?
Prompts the user for boolean input (Y/N), returning the appropriate boolean value or null if user cancelled. renderer is the class responsible for rendering the user options on the screen and reading user input. |
|
fun getStringInput(promptString: String, possibleValues: Set<String>?): String?
Prompts the user for input, printing the promptString. Validates the input is not null or blank, re-requesting input if invalid. Also validates that input is one of the given possibleValues (if not null). renderer is the class responsible for rendering the user options on the screen and reading user input. |
|
fun showMenu(: MenuOptions): Unit
Parses all labels and the associated methods to be called to construct a menu which will be displayed via the renderer. |