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 classSimpleCommandLineParser.BooleanOptionA boolean command line option.static classSimpleCommandLineParser.DecimalOptionDecimal option.static classSimpleCommandLineParser.IntegerOptionInteger option.static classSimpleCommandLineParser.LongOptionLong option.static classSimpleCommandLineParser.OptionBase class for command line options.static classSimpleCommandLineParser.StringOptionString option.static classSimpleCommandLineParser.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 voidaddOptions(SimpleCommandLineParser.Option... someOptions)Add one or more options.StringgetHelp(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
-
-