public class Arguments
extends java.lang.Object
option_args* free_form*where each element in option_args is an option starting with a '-' character and each element in free_form is a string. Option arguments have the syntax:
'-'NAME[=VALUE]where NAME is the option identifier and VALUE is the string argument for that option.
An example use of the class is as follows:
static void main(String[] args) {
Arguments cl = new Arguments();
cl.parse(args);
if (cl.getOption("verbose") != null) ... ;
String file = cl.getArgument(0);
String path = cl.getOption("classpath");
| Modifier and Type | Class and Description |
|---|---|
static class |
Arguments.Opt
Optional arguments.
|
| Constructor and Description |
|---|
Arguments(java.lang.String[] args)
Create a new CommandLine object with an initial argument array.
|