com.sun.javatest.tool
Class HelpManager

java.lang.Object
  extended by com.sun.javatest.tool.CommandManager
      extended by com.sun.javatest.tool.HelpManager

public class HelpManager
extends CommandManager

A manager for command line help.


Constructor Summary
HelpManager()
          Create a HelpManager to manage the command line help for a set of command managers.
HelpManager(CommandManager[] commandManagers)
          Create a HelpManager to manage the command line help for a set of command managers.
 
Method Summary
 HelpTree.Node getHelp()
          Get an object embodying the command line help for the commands managed by this CommandManager.
 boolean parseCommand(java.lang.String cmd, java.util.ListIterator argIter, CommandContext ctx)
          Parse a command (and any arguments it might take).
 void setCommandManagers(CommandManager[] commandManagers)
          Set the command managers for which to generate command line help.
 
Methods inherited from class com.sun.javatest.tool.CommandManager
isMatch, isMatch, isPrefixMatch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HelpManager

public HelpManager()
Create a HelpManager to manage the command line help for a set of command managers. The command managers should be set with setCommandManagers.


HelpManager

public HelpManager(CommandManager[] commandManagers)
Create a HelpManager to manage the command line help for a set of command managers.

Parameters:
commandManagers - the command managers for which to give command line help
Method Detail

getHelp

public HelpTree.Node getHelp()
Description copied from class: CommandManager
Get an object embodying the command line help for the commands managed by this CommandManager.

Specified by:
getHelp in class CommandManager
Returns:
an object embodying the command line help for the commands managed by this CommandManager

parseCommand

public boolean parseCommand(java.lang.String cmd,
                            java.util.ListIterator argIter,
                            CommandContext ctx)
Parse a command (and any arguments it might take).

Specified by:
parseCommand in class CommandManager
Parameters:
cmd - the command to be parsed
argIter - an iterator from which to get any arguments that might be required by the option
ctx - a context object to use while parsing the command
Returns:
true if the command is recognized and successfully parsed, and false otherwise

setCommandManagers

public void setCommandManagers(CommandManager[] commandManagers)
Set the command managers for which to generate command line help.

Parameters:
commandManagers - the command managers for which to generate command line help


Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.