public class CliUtils extends Object
Constructor and Description |
---|
CliUtils() |
Modifier and Type | Method and Description |
---|---|
static org.apache.commons.cli.CommandLine |
parseArguments(String[] args)
Parses an
String array of options to a CommandLine . |
static void |
printApplicationHelp()
Prints the application usage help manual.
|
static ApplicationOptions |
validateArguments(org.apache.commons.cli.CommandLine commandLine)
Validates the
HttpLogMonitoringApplication options. |
public static ApplicationOptions validateArguments(org.apache.commons.cli.CommandLine commandLine)
HttpLogMonitoringApplication
options.commandLine
- The CommandLine
created from the user command line.ApplicationOptions
with the valid option value
and the default values otherwise.public static org.apache.commons.cli.CommandLine parseArguments(String[] args) throws org.apache.commons.cli.ParseException
String
array of options to a CommandLine
.args
- a String
array of option values.CommandLine
created with the option values.org.apache.commons.cli.ParseException
- if there are any problems encountered
while parsing the command line tokenspublic static void printApplicationHelp()
Copyright © 2019. All rights reserved.