|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.oozie.cli.CLIParser
public class CLIParser
Command line parser based on Apache common-cli 1.x that supports subcommands.
| Nested Class Summary | |
|---|---|
class |
CLIParser.Command
Bean that represents a parsed command. |
| Constructor Summary | |
|---|---|
CLIParser(String cliName,
String[] cliHelp)
Create a parser. |
|
| Method Summary | |
|---|---|
void |
addCommand(String command,
String argsHelp,
String commandHelp,
org.apache.commons.cli.Options commandOptions,
boolean hasArguments)
Add a command to the parser. |
CLIParser.Command |
parse(String[] args)
Parse a array of arguments into a command. |
String |
shortHelp()
|
void |
showHelp(org.apache.commons.cli.CommandLine commandLine)
Print the help for the parser to standard output. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CLIParser(String cliName,
String[] cliHelp)
cliName - name of the parser, for help purposes.cliHelp - help for the CLI.| Method Detail |
|---|
public void addCommand(String command,
String argsHelp,
String commandHelp,
org.apache.commons.cli.Options commandOptions,
boolean hasArguments)
command - comand name.argsHelp - command arguments help.commandHelp - command description.commandOptions - command options.hasArguments -
public CLIParser.Command parse(String[] args)
throws org.apache.commons.cli.ParseException
args - array of arguments.
org.apache.commons.cli.ParseException - thrown if the arguments could not be parsed.public String shortHelp()
public void showHelp(org.apache.commons.cli.CommandLine commandLine)
commandLine - the command line
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||