Class SimpleCommandLineParser
- java.lang.Object
-
- de.gebit.integrity.runner.console.SimpleCommandLineParser
-
public class SimpleCommandLineParser extends Object
A very simple command line parser.- Author:
- Rene Schneider - initial API and implementation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimpleCommandLineParser.BooleanOption
A boolean command line option.static class
SimpleCommandLineParser.DecimalOption
Decimal option.static class
SimpleCommandLineParser.IntegerOption
Integer option.static class
SimpleCommandLineParser.LongOption
Long option.static class
SimpleCommandLineParser.Option
Base class for command line options.static class
SimpleCommandLineParser.StringOption
String option.static class
SimpleCommandLineParser.ValueOption<X>
A base class for an option that has one or more values.
-
Constructor Summary
Constructors Constructor Description SimpleCommandLineParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOptions(SimpleCommandLineParser.Option... someOptions)
Add one or more options.String
getHelp(String aRemainingParamsHelp)
Creates a help message to print out on the command line, based on the command line options registered.String[]
parseAndReturnRemaining(String[] someParameters)
Parses the given parameters and returns all parameters that could not be matched.
-
-
-
Method Detail
-
addOptions
public void addOptions(SimpleCommandLineParser.Option... someOptions)
Add one or more options.- Parameters:
someOptions
-
-
parseAndReturnRemaining
public String[] parseAndReturnRemaining(String[] someParameters) throws IllegalArgumentException
Parses the given parameters and returns all parameters that could not be matched.- Parameters:
someParameters
- the parameters to parse- Returns:
- the remaining unmatched parameters
- Throws:
IllegalArgumentException
-
-