org.apache.commons.cli
public class GnuParser extends Parser
(Options,String[],boolean) flatten method.
Version: $Revision: 542151 $
See Also: Parser
| Field Summary | |
|---|---|
| ArrayList | tokens holder for flattened tokens |
| Method Summary | |
|---|---|
| protected String[] | flatten(Options options, String[] arguments, boolean stopAtNonOption) |
| void | init() Resets the members to their original state i.e. remove
all of |
This flatten method does so using the following rules:
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.Parameters: options The Options to parse the arguments by. arguments The arguments that have to be flattened. stopAtNonOption specifies whether to stop flattening when a non option has been encountered
Returns: a String array of the flattened arguments
Resets the members to their original state i.e. remove
all of tokens entries.