bb.util
Class CommandLineInterface.Commands

java.lang.Object
  extended by 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:

  1. it must take no arguments (the current command line interface is too crude to pass any in)
  2. 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.)


Constructor Summary
private CommandLineInterface.Commands()
           
 
Method Summary
(package private)  void listCommands()
           
(package private)  void printSystemProperties()
           
(package private)  void printTime()
           
(package private)  void quit()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandLineInterface.Commands

private CommandLineInterface.Commands()
Method Detail

listCommands

void listCommands()

printSystemProperties

void printSystemProperties()

printTime

void printTime()

quit

void quit()