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.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| private TextBuiltin | |
| private final Repository | |
| private boolean | |
| private RevWalk |
| Access | Constructor and Description |
|---|---|
| public | CmdLineParser(Object
instance of a class annotated by
bean)org. and
org.. this object will receive
values.Creates a new command line owner that parses arguments/options and set them into the given object. |
| public | CmdLineParser(Object
instance of a class annotated by
bean, Repository org. and
org.. this object will receive
values.repository this parser can translate options through. repo)Creates a new command line owner that parses arguments/options and set them into the given object. |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | Returns: true if the given array contains help optionnon null args)Check if array contains help option |
| protected OptionHandler | createOptionHandler(OptionDef o, Setter<T> setter)
Overrides org. Creates an |
| public Repository | Returns: the repository, if specified during construction.Get the repository this parser translates values through. |
| public RevWalk | Returns: the revision walk used by this option parser.Get the revision walker used to support option parsing. |
| public RevWalk | Returns: the revision walk used by this option parser, or null.Get the revision walker used to support option parsing. |
| public void | parseArgument(String...
arguments to parse args)Overrides org. Parses the command line arguments and set them to the option bean given in the constructor. |
| public void | printSingleLineUsage(Writer w, ResourceBundle
if this is non- rb)null, Option#usage() is treated
as a key to obtain the actual message from this resource bundle.Overrides org. Prints a single-line usage to the screen. |
| private void | |
| private void | |
| private boolean | |
| private List |
| cmd | back to summary |
|---|---|
| private TextBuiltin cmd | |
| db | back to summary |
|---|---|
| private final Repository db | |
| seenHelp | back to summary |
|---|---|
| private boolean seenHelp | |
| walk | back to summary |
|---|---|
| private RevWalk walk | |
| CmdLineParser | back to summary |
|---|---|
| public CmdLineParser(Object bean) Creates a new command line owner that parses arguments/options and set them into the given object.
| |
| CmdLineParser | back to summary |
|---|---|
| public CmdLineParser(Object bean, Repository repo) Creates a new command line owner that parses arguments/options and set them into the given object.
| |
| containsHelp | back to summary |
|---|---|
| protected boolean containsHelp(String... args) Check if array contains help option
| |
| createOptionHandler | back to summary |
|---|---|
| protected OptionHandler Overrides org. Doc from org. Creates an
| |
| getRepository | back to summary |
|---|---|
| public Repository getRepository() Get the repository this parser translates values through.
| |
| getRevWalk | back to summary |
|---|---|
| public RevWalk getRevWalk() Get the revision walker used to support option parsing.
| |
| getRevWalkGently | back to summary |
|---|---|
| public RevWalk getRevWalkGently() Get the revision walker used to support option parsing. This method does not initialize the RevWalk and may return null.
| |
| parseArgument | back to summary |
|---|---|
| public void parseArgument(String... args) throws CmdLineException Overrides org. Doc from org. Parses the command line arguments and set them to the option bean given in the constructor.
| |
| printSingleLineUsage | back to summary |
|---|---|
| public void printSingleLineUsage(Writer w, ResourceBundle rb) Overrides org. Doc from org. Prints a single-line usage to the screen.
| |
| printToErrorWriter | back to summary |
|---|---|
| private void printToErrorWriter(String error) | |
| restoreRequiredOptions | back to summary |
|---|---|
| private void restoreRequiredOptions(List<OptionHandler<T>> backup) | |
| sortRestOfArgumentsHandlerToTheEnd | back to summary |
|---|---|
| private boolean sortRestOfArgumentsHandlerToTheEnd(List<OptionHandler<T>> options) | |
| unsetRequiredOptions | back to summary |
|---|---|
| private List | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public String | toString()
Overrides org. Returns a string representation of the object. |
| MyOptionDef | back to summary |
|---|---|
| public MyOptionDef(OptionDef o) | |
| required | back to summary |
|---|---|
| public boolean required() Overrides org.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |