-
Notifications
You must be signed in to change notification settings - Fork 440
Closed
Milestone
Description
Currently a Map option needs to specify a paramLabel
to indicate the parameter is a KEY=VALUE pair. If no paramLabel is specified, the generated usage help should show keyType=valueType.
Example:
class Args {
@Option(names = "-a") // default
Map<String, String> a;
@Option(names = "-b", arity = "0..*", type = {Integer.class, Integer.class})
Map<Integer, Integer> b;
@Option(names = "-c", paramLabel = "KEY=VALUE", arity = "1..*", type = {String.class, TimeUnit.class})
Map<String, TimeUnit> c;
@Option(names = "-d", arity = "2..*", type = {String.class, URL.class})
Map<String, URL> d;
}
Desired usage help output:
Usage: <main class> [-a=<String=String>]... [-b=[<Integer=Integer>]...]...
[-c=KEY=VALUE...]... [-d=<String=URL> <String=URL>...]...
-a= <String=String>
-b= [<Integer=Integer>]...
-c= KEY=VALUE...
-d= <String=URL> <String=URL>...
Currently shows:
Usage: <main class> [-a=<a>]... [-b=[<b>]...]... [-c=KEY=VALUE...]... [-d=<d>
<d>...]...
-a= <a>
-b= [<b>]...
-c= KEY=VALUE...
-d= <d> <d>...