Package org.dspace.cli
Class DSpaceSkipUnknownArgumentsParser
java.lang.Object
org.apache.commons.cli.DefaultParser
org.dspace.cli.DSpaceSkipUnknownArgumentsParser
- All Implemented Interfaces:
org.apache.commons.cli.CommandLineParser
public class DSpaceSkipUnknownArgumentsParser
extends org.apache.commons.cli.DefaultParser
Extended version of the DefaultParser. This parser skip/ignore unknown arguments.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.cli.DefaultParser
org.apache.commons.cli.DefaultParser.Builder -
Field Summary
Fields inherited from class org.apache.commons.cli.DefaultParser
cmd, currentOption, currentToken, expectedOpts, options, skipParsing, stopAtNonOption -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.commons.cli.CommandLineorg.apache.commons.cli.CommandLineParse the arguments according to the specified options and properties.org.apache.commons.cli.CommandLineparse(org.apache.commons.cli.Options options, String[] arguments, Properties properties) org.apache.commons.cli.CommandLineparse(org.apache.commons.cli.Options options, String[] arguments, Properties properties, boolean stopAtNonOption) Parse the arguments according to the specified options and properties.Methods inherited from class org.apache.commons.cli.DefaultParser
builder, checkRequiredOptions, handleConcatenatedOptions
-
Constructor Details
-
DSpaceSkipUnknownArgumentsParser
public DSpaceSkipUnknownArgumentsParser()
-
-
Method Details
-
parse
public org.apache.commons.cli.CommandLine parse(org.apache.commons.cli.Options options, String[] arguments) throws org.apache.commons.cli.ParseException - Specified by:
parsein interfaceorg.apache.commons.cli.CommandLineParser- Overrides:
parsein classorg.apache.commons.cli.DefaultParser- Throws:
org.apache.commons.cli.ParseException
-
parse
public org.apache.commons.cli.CommandLine parse(org.apache.commons.cli.Options options, String[] arguments, Properties properties) throws org.apache.commons.cli.ParseException - Overrides:
parsein classorg.apache.commons.cli.DefaultParser- Throws:
org.apache.commons.cli.ParseException
-
parse
public org.apache.commons.cli.CommandLine parse(org.apache.commons.cli.Options options, String[] arguments, boolean stopAtNonOption) throws org.apache.commons.cli.ParseException Parse the arguments according to the specified options and properties.- Specified by:
parsein interfaceorg.apache.commons.cli.CommandLineParser- Overrides:
parsein classorg.apache.commons.cli.DefaultParser- Parameters:
options- the specified Optionsarguments- the command line argumentsstopAtNonOption- can be ignored - an unrecognized argument is ignored, an unrecognized argument doesn't stop the parsing and doesn't trigger a ParseException- Returns:
- the list of atomic option and value tokens
- Throws:
org.apache.commons.cli.ParseException- if there are any problems encountered while parsing the command line tokens.
-
parse
public org.apache.commons.cli.CommandLine parse(org.apache.commons.cli.Options options, String[] arguments, Properties properties, boolean stopAtNonOption) throws org.apache.commons.cli.ParseException Parse the arguments according to the specified options and properties.- Overrides:
parsein classorg.apache.commons.cli.DefaultParser- Parameters:
options- the specified Optionsarguments- the command line argumentsproperties- command line option name-value pairsstopAtNonOption- can be ignored - an unrecognized argument is ignored, an unrecognized argument doesn't stop the parsing and doesn't trigger a ParseException- Returns:
- the list of atomic option and value tokens
- Throws:
org.apache.commons.cli.ParseException- if there are any problems encountered while parsing the command line tokens.
-