org.adougou.cline
Class CommandRegister

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--org.adougou.cline.CommandRegister
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class CommandRegister
extends java.util.Hashtable

This class is used internally by the BasePrompt to maintain a table of registered commands. You should never be required to interact with it using the cline package.

See Also:
Serialized Form

Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Constructor Summary
CommandRegister()
           
 
Method Summary
 void add(Command command)
           
 void add(ICLinePackage ci)
          Registers an entire Java package for use with the command line.
 void execute(java.lang.String command)
          Parses a string containing a command name and arguments and then executes the command if it was well structured (the string 'command' will be parsed - looking for the name of the command and any arguments required for that command).
 void exit()
           
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommandRegister

public CommandRegister()
Method Detail

add

public final void add(Command command)

add

public void add(ICLinePackage ci)
Registers an entire Java package for use with the command line. All commands returned by this packages getCommands() method will be registerred when this method is called.

exit

public void exit()

execute

public void execute(java.lang.String command)
Parses a string containing a command name and arguments and then executes the command if it was well structured (the string 'command' will be parsed - looking for the name of the command and any arguments required for that command).