Using <init>(string) or Class.valueOf(string) to convert string to object in addition to IStringConverter

3 views
Skip to first unread message

Dieter Bogdoll

unread,
Sep 25, 2017, 4:18:08 PM9/25/17
to jcommander
Hi all

If a @Parameter annotation is attached to a field which is not a a basic type like int, string, etc. JCommander tries to find a compatible IStringConverter

to convert from string to the acutal type.If JCommander doesn't find any such converter he returns an error message to the console.


I created a pull request which lets JCommander check if there is a static method called "valueOf" or a constructor which takes a single string to convert a command line
argument to a custom type in the case there was no converter mentioned within the @Parameter annotation.


I created that request two weeks ago and sofar I didn't got any feedback. Should I assume that my pull request was rejected or should I just wait longer?


Best regards,

Dieter



Reply all
Reply to author
Forward
0 new messages