Package com.sun.javatest.tool
Class HelpManager
java.lang.Object
com.sun.javatest.tool.CommandManager
com.sun.javatest.tool.HelpManager
A manager for command line help.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate 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
Modifier and TypeMethodDescriptiongetHelp()
Get an object embodying the command line help for the commands managed by this CommandManager.boolean
parseCommand
(String cmd, ListIterator<String> 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
-
Constructor Details
-
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
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 Details
-
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 classCommandManager
- Returns:
- an object embodying the command line help for the commands managed by this CommandManager
-
parseCommand
Parse a command (and any arguments it might take).- Specified by:
parseCommand
in classCommandManager
- Parameters:
cmd
- the command to be parsedargIter
- an iterator from which to get any arguments that might be required by the optionctx
- a context object to use while parsing the command- Returns:
- true if the command is recognized and successfully parsed, and false otherwise
-
setCommandManagers
Set the command managers for which to generate command line help.- Parameters:
commandManagers
- the command managers for which to generate command line help
-