Class ShellCommandTable

java.lang.Object
  extended byShellCommandTable
All Implemented Interfaces:
Serializable

public class ShellCommandTable
extends Object
implements Serializable

A ShellCommandTable object maintains a dispatch table of ShellCommand objects keyed by the command names used to invoke them. To add a new shell command to the table, install it from method fillTable().

Version:
10
See Also:
ShellCommand, Serialized Form

Constructor Summary
ShellCommandTable()
          Construct and fill a shell command table.
 
Method Summary
 String[] getCommandNames()
          Get an array of the command names.
 ShellCommand lookup(String key)
          Get a ShellCommand, given the command name key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShellCommandTable

public ShellCommandTable()
Construct and fill a shell command table.

Method Detail

getCommandNames

public String[] getCommandNames()
Get an array of the command names.

Returns:
the array of command names.

lookup

public ShellCommand lookup(String key)
Get a ShellCommand, given the command name key.

Parameters:
key - the name associated with the command we're looking for.
Returns:
the command we're looking for, null if none.