Package org.apache.commons.cli
Class GnuParser
- java.lang.Object
-
- org.apache.commons.cli.Parser
-
- org.apache.commons.cli.GnuParser
-
- All Implemented Interfaces:
CommandLineParser
public class GnuParser extends Parser
The class GnuParser provides an implementation of theflattenmethod.- Version:
- $Revision: 680644 $, $Date: 2008-07-29 01:13:48 -0700 (Tue, 29 Jul 2008) $
- Author:
- John Keyes (john at integralsource.com)
-
-
Constructor Summary
Constructors Constructor Description GnuParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String[]flatten(Options options, java.lang.String[] arguments, boolean stopAtNonOption)-
Methods inherited from class org.apache.commons.cli.Parser
checkRequiredOptions, getOptions, getRequiredOptions, parse, parse, parse, parse, processArgs, processOption, processProperties, setOptions
-
-
-
-
Constructor Detail
-
GnuParser
public GnuParser()
-
-
Method Detail
-
flatten
protected java.lang.String[] flatten(Options options, java.lang.String[] arguments, boolean stopAtNonOption)
This flatten method does so using the following rules:- If an
Optionexists for the first character of theargumentsentry AND anOptiondoes not exist for the wholeargumentthen 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. - Otherwise just add the token to the processed tokens list.
- If an
-
-