jcommander icon indicating copy to clipboard operation
jcommander copied to clipboard

FR: @DynamicParameter converter

Open Hubbitus opened this issue 8 years ago • 2 comments

Hello.

You have com.beust.jcommander.Parameter#converter to easy write user converters for list values, but com.beust.jcommander.DynamicParameter has no such option.

But it may be helpful for map also! So instead of just Map<String, String> we may have something like:

@DynamicParameter(names = "--keep", description = "Dynamic parameters go here", converter = CustomUserClassConverter.class)
Map<String,CustomUserClass> keeps = new HashMap<>();

Hubbitus avatar Sep 19 '17 13:09 Hubbitus

Sounds good, would you be interested in sending a PR?

cbeust avatar Sep 19 '17 13:09 cbeust

Sure I could try.

Hubbitus avatar Sep 19 '17 13:09 Hubbitus