public interface CommandLineParser
CommandLineParser
interface
can parse a String array according to the Options
specified
and return a CommandLine
.Modifier and Type | Method and Description |
---|---|
CommandLine |
parse(Options options,
String[] arguments)
Parse the arguments according to the specified options.
|
CommandLine |
parse(Options options,
String[] arguments,
boolean stopAtNonOption)
Parse the arguments according to the specified options.
|
CommandLine parse(Options options, String[] arguments) throws ParseException
options
- the specified Optionsarguments
- the command line argumentsParseException
- if there are any problems encountered
while parsing the command line tokens.CommandLine parse(Options options, String[] arguments, boolean stopAtNonOption) throws ParseException
options
- the specified Optionsarguments
- the command line argumentsstopAtNonOption
- if true an unrecognized argument stops
the parsing and the remaining arguments are added to the
CommandLine
s args list. If false an unrecognized
argument triggers a ParseException.ParseException
- if there are any problems encountered
while parsing the command line tokens.Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.