Skip to content
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 ArgSpec.getTypedValues() method #366

Closed
remkop opened this issue Apr 18, 2018 · 0 comments
Closed

Add ArgSpec.getTypedValues() method #366

remkop opened this issue Apr 18, 2018 · 0 comments

Comments

@remkop
Copy link
Owner

remkop commented Apr 18, 2018

Given a command like this:

class App {
  @Option(names = "-a", arity = "1")
  String a;
}

The following input results in the value 3 being assigned to the App.a field:

<command> -a 1 -a 2 -a 3

This is fine for annotations but for the programmatic API there are cases where we want to know the first value that was assigned, or all values. We can get the strings that were matched with ArgSpec.stringValues() but there is no equivalent for the type-converted values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant