Class JLineCommandHandler
java.lang.Object
pro.gravit.utils.command.CommandHandler
pro.gravit.utils.command.JLineCommandHandler
- All Implemented Interfaces:
Runnable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class CommandHandler
CommandHandler.Category, CommandHandler.CommandWalkModifier and TypeClassDescriptionstatic classstatic interface -
Field Summary
Fields inherited from class CommandHandler
baseCategory, categoriesModifier and TypeFieldDescriptionprotected final CommandCategoryprotected final List<CommandHandler.Category> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class CommandHandler
eval, eval, evalNative, findCategory, findCommand, getBaseCategory, getCategories, lookup, registerCategory, registerCommand, run, unregisterCategory, unregisterCommand, walkModifier and TypeMethodDescriptionvoidvoidvoidevalNative(String line, boolean bell) findCategory(String name) findCommand(String name) voidregisterCategory(CommandHandler.Category category) voidregisterCommand(String name, Command command) voidrun()voidunregisterCategory(CommandHandler.Category category) unregisterCommand(String name) voidwalk(CommandHandler.CommandWalk callback) Walk all categories Categories are sorted in the order they are added.
-
Constructor Details
-
JLineCommandHandler
- Throws:
IOException
-
-
Method Details
-
bell
public void bell()Description copied from class:CommandHandlerIf supported, sends a bell signal to the console- Specified by:
bellin classCommandHandler
-
clear
public void clear()Description copied from class:CommandHandlerCleans the console- Specified by:
clearin classCommandHandler
-
readLine
Description copied from class:CommandHandlerReads a line from the console- Specified by:
readLinein classCommandHandler- Returns:
- command line
-