All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Acme.Comnd.Comnd

java.lang.Object
   |
   +----Acme.Comnd.Comnd

public abstract class Comnd
extends Object
TOPS-20 style command line parsing.

Before the VAX age, Digital had another line of large minis. Based on hardware similar to the 36-bit PDP-10 line, and software based on BBN's TENEX operating system, the 20s were in many ways never surpassed by later minis.

One of the niftiest aspects of TOPS-20, the OS, was the style of command parsing. The parsing was actually implemented in the OS as the COMND system call. The command line interpreter (shell) was called EXEC, and it made extensive use of COMND.

There are vestiges of COMND in Unix shells. When entering command arguments, you can type part of a filename and then hit escape or control-D. If you have typed a unique prefix of a filename in the local directory, the shell will complete the filename for you, or show you a list of filenames that match. COMND could do that, and a whole lot more - it was a generalized command-line parser.

Fetch the software.
Fetch the entire Acme package.


Variable Index

 o clientData
 o invisible

Constructor Index

 o Comnd()

Method Index

 o complete(ComndContext)
Each type of Comnd implements this to auto-complete partial input.
 o getClientData()
An arbitrary object that can be associated with a Comnd.
 o help(ComndContext)
Each type of Comnd implements this to display a help message.
 o parse(ComndContext)
Each type of Comnd implements this to parse the input.
 o results(ComndContext)
Each type of Comnd implements this to return the value of the item after parsing.
 o setClientData(Object)
An arbitrary object that can be associated with a Comnd.
 o setInvisible(boolean)
An invisible item can still be parsed, but will not appear in help lists.

Variables

 o invisible
 protected boolean invisible
 o clientData
 protected Object clientData

Constructors

 o Comnd
 public Comnd()

Methods

 o parse
 public abstract Comnd[] parse(ComndContext ctx)
Each type of Comnd implements this to parse the input. The return is a list containing the items parsed. If the parse fails, null is returned.

 o results
 public abstract Object results(ComndContext ctx)
Each type of Comnd implements this to return the value of the item after parsing. The type returned varies by the type of the Comnd - could be a String, an Integer, etc.

 o help
 protected abstract void help(ComndContext ctx)
Each type of Comnd implements this to display a help message.

 o complete
 protected abstract void complete(ComndContext ctx)
Each type of Comnd implements this to auto-complete partial input.

 o setInvisible
 public void setInvisible(boolean i)
An invisible item can still be parsed, but will not appear in help lists.

 o setClientData
 public void setClientData(Object cd)
An arbitrary object that can be associated with a Comnd.

 o getClientData
 public Object getClientData()
An arbitrary object that can be associated with a Comnd.


All Packages  Class Hierarchy  This Package  Previous  Next  Index

ACME Java  ACME Labs