public final class CommandLine extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
CommandLine.ArgumentsConsumer<T>
Command line arguments consumer.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
getOptionValue(String[] args,
String optionName)
Search for an argument "-<option>=<value>" where option is the given option name, and return the value.
|
static <T> void |
parse(String[] args,
T context,
CommandLine.ArgumentsConsumer<T>[][] steps)
Parse the command line arguments.
|
public static String getOptionValue(String[] args, String optionName)
public static <T> void parse(String[] args, T context, CommandLine.ArgumentsConsumer<T>[][] steps) throws Exception
T - type of contextargs - command line argumentscontext - contextsteps - consumers for each stepExceptionCopyright © 2019. All rights reserved.