org.apache.commons.cli

Class BasicParser

Implemented Interfaces:
CommandLineParser

public class BasicParser
extends Parser

The class BasicParser provides a very simple implementation of the flatten method.

Author:
John Keyes (john at integralsource.com)

See Also:
Parser

Field Summary

Fields inherited from class org.apache.commons.cli.Parser

cmd, options, requiredOptions

Method Summary

protected String[]
flatten(Options options, String[] arguments, boolean stopAtNonOption)
A simple implementation of Parser's abstract flatten method.

Methods inherited from class org.apache.commons.cli.Parser

checkRequiredOptions, flatten, parse, parse, processArgs, processOption

Method Details

flatten

protected String[] flatten(Options options,
                           String[] arguments,
                           boolean stopAtNonOption)
A simple implementation of Parser's abstract flatten method.

Note: options and stopAtNonOption are not used in this flatten method.

Overrides:
flatten in interface Parser

Parameters:
options - The command line Options
arguments - The command line arguments to be parsed
stopAtNonOption - Specifies whether to stop flattening when an non option is found.

Returns:
The arguments String array.