|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.cli.Parser
org.apache.commons.cli.GnuParser
public class GnuParser
The class GnuParser provides an implementation of the
flatten
method.
Parser
Field Summary | |
---|---|
private java.util.ArrayList |
tokens
holder for flattened tokens |
Constructor Summary | |
---|---|
GnuParser()
|
Method Summary | |
---|---|
protected java.lang.String[] |
flatten(Options options,
java.lang.String[] arguments,
boolean stopAtNonOption)
This flatten method does so using the following rules: If an Option exists for the first character of
the arguments entry AND an Option
does not exist for the whole argument then
add the first character as an option to the processed tokens
list e.g. |
private void |
init()
Resets the members to their original state i.e. |
Methods inherited from class org.apache.commons.cli.Parser |
---|
parse, parse, processArgs |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.ArrayList tokens
Constructor Detail |
---|
public GnuParser()
Method Detail |
---|
private void init()
Resets the members to their original state i.e. remove
all of tokens
entries.
protected java.lang.String[] flatten(Options options, java.lang.String[] arguments, boolean stopAtNonOption)
This flatten method does so using the following rules:
Option
exists for the first character of
the arguments
entry AND an Option
does not exist for the whole argument
then
add the first character as an option to the processed tokens
list e.g. "-D" and add the rest of the entry to the also.
flatten
in class Parser
options
- The Options to parse the arguments by.stopAtNonOption
- specifies whether to stop
flattening when a non option has been encountered
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |