jio.console.package-info Maven / Gradle / Ivy
/**
* The `jio.console` package provides classes and components to build interactive command-line console applications.
* These applications allow users to input commands, execute them, and interact with the program in a text-based
* interface. This package includes various utility classes and predefined commands to streamline the development of
* console applications.
*
* Key Components:
*
* - {@link jio.console.Console}: The central class that creates a Read, Eval, Print Loop (REPL) program. It accepts a list
* of user-defined commands and provides methods to execute them interactively. Predefined commands are also available.
*
* - {@link jio.console.Command}: An interface that defines the structure of a console command. Developers can implement this
* interface to create custom commands for the console application.
*
* - {@link jio.console.State}: A class that represents the state of the console application. It manages variables, command history,
* and other state-related aspects of the application.
*
*
* Predefined Commands:
* The package includes several predefined commands that can be readily used in console applications. These commands
* cover a range of common functionality, such as listing available commands, reading and setting variables, executing
* the last command, displaying command history, and more.
*
* Creating Custom Commands:
* To extend the functionality of your console application, you can create custom commands. Implement the {@link jio.console.Command}
* interface to define the behavior of your command, and then add it to the list of user-defined commands in the `Console`
* constructor.
*
* Execution Loop:
* The `Console` class provides an `eval` method that starts the execution loop. Users can input commands, and the program
* will evaluate, execute, and display the results in a loop until explicitly exited. The `eval` method also accepts a
* configuration JSON object that can be passed to commands for configuration purposes.
*
* Developers can leverage the provided components and commands to create robust and user-friendly command-line
* applications.
*/
package jio.console;