paulk-asert commented on pull request #1467:
URL: https://github.com/apache/groovy/pull/1467#issuecomment-765727275


   Do you have an example of where you'd use the type?
   
   In general, having code which relies on underlying implementation details is 
always harder to port compared to code which uses the published API.
   
   I don't know whether the following helps:
   ```
   def cli = new groovy.cli.commons.CliBuilder()
   cli.a(args: 1, longOpt: 'abc', type: double, 'abc')
   def options = cli.parse(['--abc', '0.0'])
   assert options.abc instanceof Double
   assert options.getSavedTypeOptions()['abc']?.type.toString() == 'double'
   ```
   It illustrates how to get the type in a way the leaks some details of the 
CliBuilder implementation but not details from the underlying CLI library and 
should port unchanged across to picocli.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to