howard-3 commented on pull request #1467:
URL: https://github.com/apache/groovy/pull/1467#issuecomment-765737156


   I can't really show the actual code, but it looks something like this
   ```
   def a = cli.parse(..)
   a.getOptions().each {
     def prop = it.getLongOpt();
     def type = it.getType();
     def val = it.getValue()
     switch (type) {
       case Number: 
         parseNumber
         break;
        case Boolean:
          boolean.valueof()
       ...
        default:
          throw new UnsupportedOperationException(...)
     }
   }
   ```
   
   based on the groovy 2 docs, it does seem to support this behavior although 
didn't explicitly encourage it.
   
http://docs.groovy-lang.org/2.4.7/html/gapi/groovy/util/CliBuilder.html#options
   


----------------------------------------------------------------
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