-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more built-in converters #83
Labels
Milestone
Comments
Note that Duration is a Java 8 class. |
java.time.Duration that is. |
Single (long) line or not, if I do it more than once, I will want to refactor it. My vote is for ease of use the first go around. |
I would make Java 8 the min req and avoid reflection hacks. |
remkop
added a commit
that referenced
this issue
Dec 18, 2017
remkop
added a commit
that referenced
this issue
Dec 18, 2017
remkop
added a commit
that referenced
this issue
Dec 18, 2017
remkop
added a commit
that referenced
this issue
Dec 19, 2017
remkop
added a commit
that referenced
this issue
Dec 19, 2017
remkop
added a commit
that referenced
this issue
Dec 19, 2017
remkop
added a commit
that referenced
this issue
Dec 19, 2017
remkop
added a commit
that referenced
this issue
Dec 19, 2017
Also reduced duplicate tracing for #83 reflective type converters.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gary has some good ideas. Picking Java 5-native types:
Special care needed:
int
. Picocli may need to introduce aconverter
attribute on@Option
and@Parameters
to support the ability to have different converters on a per-field basis instead of just on a per-type basis.Java 6 or higher (reflection?)
Unsure
Unsure about some of the remaining converters; these types may not be used often...
Picocli makes registering custom converters much easier than JCommander. In JCommander one must specify a converter class name in the annotation, so an actual named class needs to be defined. In picocli, a single line lambda expression is sufficient. For example,
Given the above ease of use I'm not sure we need built-in converters for the below:
The text was updated successfully, but these errors were encountered: