Package org.apache.creadur.whisker.cli
Class Main
java.lang.Object
org.apache.creadur.whisker.cli.Main
Command line interface for whisker.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionParses arguments and configures the application.static void
Bootstraps application.org.apache.commons.cli.CommandLine
Parses a line of arguments.boolean
Do these command line arguments ask for help?int
Runs Whisker.
-
Constructor Details
-
Main
Constructs a wrapper for the given application.- Parameters:
whisker
- not null
-
-
Method Details
-
main
Bootstraps application.- Parameters:
args
- not null- Throws:
Exception
- when application fails unexpectedly
-
parse
public org.apache.commons.cli.CommandLine parse(String[] args) throws org.apache.commons.cli.ParseException Parses a line of arguments.- Parameters:
args
- not null- Returns:
- not null
- Throws:
org.apache.commons.cli.ParseException
- when parsing fails
-
configure
Parses arguments and configures the application.- Parameters:
args
- not null- Returns:
- not null
- Throws:
org.apache.commons.cli.ParseException
- when arguments cannot be parsed
-
run
Runs Whisker.- Parameters:
args
- not null- Returns:
- system return code
- Throws:
Exception
- when application unexpectedly fails
-
printHelp
Do these command line arguments ask for help?- Parameters:
args
- not null- Returns:
- true when command line contains option for help, false otherwise
- Throws:
org.apache.commons.cli.ParseException
- in case options could not be read properly.
-