|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.kohsuke.args4j.CmdLineParser
org.eclipse.jgit.pgm.opt.CmdLineParser
public class CmdLineParser
Extended command line parser which handles --foo=value arguments.
The args4j package does not natively handle --foo=value and instead prefers to see --foo value on the command line. Many users are used to the GNU style --foo=value long option, so we convert from the GNU style format to the args4j style format prior to invoking args4j for parsing.
| Constructor Summary | |
|---|---|
CmdLineParser(java.lang.Object bean)
Creates a new command line owner that parses arguments/options and set them into the given object. |
|
CmdLineParser(java.lang.Object bean,
org.eclipse.jgit.lib.Repository repo)
Creates a new command line owner that parses arguments/options and set them into the given object. |
|
| Method Summary | |
|---|---|
org.eclipse.jgit.lib.Repository |
getRepository()
Get the repository this parser translates values through. |
org.eclipse.jgit.revwalk.RevWalk |
getRevWalk()
Get the revision walker used to support option parsing. |
org.eclipse.jgit.revwalk.RevWalk |
getRevWalkGently()
Get the revision walker used to support option parsing. |
void |
parseArgument(java.lang.String... args)
|
| Methods inherited from class org.kohsuke.args4j.CmdLineParser |
|---|
createOptionHandler, isOption, printExample, printExample, printSingleLineUsage, printSingleLineUsage, printUsage, printUsage, registerHandler, setUsageWidth, stopOptionParsing |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CmdLineParser(java.lang.Object bean)
bean - instance of a class annotated by Option and
Argument. this object will receive values.
org.kohsuke.args4j.IllegalAnnotationError - if the option bean class is using args4j annotations
incorrectly.
public CmdLineParser(java.lang.Object bean,
org.eclipse.jgit.lib.Repository repo)
bean - instance of a class annotated by Option and
Argument. this object will receive values.repo - repository this parser can translate options through.
org.kohsuke.args4j.IllegalAnnotationError - if the option bean class is using args4j annotations
incorrectly.| Method Detail |
|---|
public void parseArgument(java.lang.String... args)
throws org.kohsuke.args4j.CmdLineException
parseArgument in class org.kohsuke.args4j.CmdLineParserorg.kohsuke.args4j.CmdLineExceptionpublic org.eclipse.jgit.lib.Repository getRepository()
public org.eclipse.jgit.revwalk.RevWalk getRevWalk()
public org.eclipse.jgit.revwalk.RevWalk getRevWalkGently()
This method does not initialize the RevWalk and may return null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||