public class RelaxedCommandLineParser
extends org.apache.commons.cli.GnuParser
flatten
method.
THREAD MODE: SINGLE-THREADED paserConstructor and Description |
---|
RelaxedCommandLineParser() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String[] |
flatten(org.apache.commons.cli.Options options,
java.lang.String[] arguments,
boolean stopAtNonOption)
A simple implementation of
Parser 's abstract
flatten method. |
static java.util.Properties |
makeLegacyProperties(java.lang.String[] arguments)
make a old sytle properties
|
protected java.lang.String[] |
populateKnownOptions(org.apache.commons.cli.Options options,
java.lang.String[] arguments)
add known options
|
void |
setLegacyArgs(boolean flag)
make as using legacy args
|
protected java.lang.String[] |
stripKnownArgs(org.apache.commons.cli.Options options,
java.lang.String[] fArgs)
remove known options that will cause an error
|
protected java.lang.String[] flatten(org.apache.commons.cli.Options options, java.lang.String[] arguments, boolean stopAtNonOption)
A simple implementation of Parser
's abstract
flatten
method.
Note: options
and stopAtNonOption
are not used in this flatten
method.
flatten
in class org.apache.commons.cli.GnuParser
options
- The command line Options
arguments
- The command line arguments to be parsedstopAtNonOption
- Specifies whether to stop flattening
when an non option is found.arguments
String array.public void setLegacyArgs(boolean flag)
flag
- true if using legacy argsprotected java.lang.String[] populateKnownOptions(org.apache.commons.cli.Options options, java.lang.String[] arguments)
arguments
- the original argsoptions
- the option set to append to.public static java.util.Properties makeLegacyProperties(java.lang.String[] arguments)
arguments
- the command line argsprotected java.lang.String[] stripKnownArgs(org.apache.commons.cli.Options options, java.lang.String[] fArgs)
options
- the optionsfArgs
- the full list of argsstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.