bb.util
Class CommandLineInterface.Commands
java.lang.Object
bb.util.CommandLineInterface.Commands
- Enclosing class:
- CommandLineInterface
private static class CommandLineInterface.Commands
- extends Object
Whenever you wish to add a command to the CommandLineInterface class,
all that you need to do is add it as a method of this class.
(Reflection in listCommands
and CommandLineInterface.StdinReader
will figure out all the rest).
Every command method is subject to the following restrictions:
- it must take no arguments (the current command line interface is too crude to pass any in)
- it must not have private access (recommendation: for simplicity, use default access)
Otherwise, it is completely arbitrary how you name each command method,
how it behaves, and whether or not it throws any type of Throwable.
Note: the order in which command methods are declared below
is likely to be the order in which they are listed by listCommands
.
(This comes from the current behavior of Class.getDeclaredMethods
:
altho this behavior is not guaranteed to occur, it is what is currently observed.)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CommandLineInterface.Commands
private CommandLineInterface.Commands()
listCommands
void listCommands()
printSystemProperties
void printSystemProperties()
printTime
void printTime()
quit
void quit()