gov.sandia.ccaffeine.cmd
Class CmdActionHelp

java.lang.Object
  extended by gov.sandia.ccaffeine.cmd.CmdActionHelp
All Implemented Interfaces:
CmdAction

public class CmdActionHelp
extends java.lang.Object
implements CmdAction

Default standard Help command for all parsers.


Constructor Summary
CmdActionHelp()
           
 
Method Summary
 java.lang.String argtype()
          Describes the args Vector wanted by this Command.
 void doIt(CmdContext cc, java.util.Vector args)
          Display help on command if given or all commands if none specified.
 java.lang.String help()
          Returns a string containing the description of this command.
 java.lang.String[] names()
          name(s) of the function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmdActionHelp

public CmdActionHelp()
Method Detail

doIt

public void doIt(CmdContext cc,
                 java.util.Vector args)
Display help on command if given or all commands if none specified.

Specified by:
doIt in interface CmdAction

help

public java.lang.String help()
Description copied from interface: CmdAction
Returns a string containing the description of this command.

Specified by:
help in interface CmdAction

argtype

public java.lang.String argtype()
Description copied from interface: CmdAction
Describes the args Vector wanted by this Command. // This is our hack to get around stupid varargs-lessness in java. // Each character indicates a separate user argument and its type. // Type checked user input: // C --> class named by user. // c --> optional class named by user. // I --> instance named by user. // i --> optional instance named by user. // S --> string token from user. // s --> optional string token from user. // K,k --> Long value, optional Long. // D,d --> Integer value, optional Integer. // B,b --> Boolean value, optional Boolean. // G,g --> Double value, optional Double. // * --> repeat previous character ad infinitum. can only appear last. // Special (cannot be followed directly by *): // A --> all of the line after as a single string. // a --> all of the line (if any) as a single string. // L --> the list of known CmdActions. // P --> the command parser itself. A more extensible scheme of tags for the parser is desirable.

Specified by:
argtype in interface CmdAction

names

public java.lang.String[] names()
Description copied from interface: CmdAction
name(s) of the function.

Specified by:
names in interface CmdAction