Skip to content

Add ArgSpec.getTypedValues() method #366

@remkop

Description

@remkop

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions