It would be nice if using parser.ofType(int.class) was equivalent to parser.ofType(Integer.class), but currently it fails because Reflection doesn't handle autoboxing.
Generics specification makes int.class and Integer.class equivalent for generic purposes (i.e. parser.ofType(int.class) is of type ArgumentAcceptingOptionSpec.
That sounds like a reasonable, simple change.
gh-5 -- Allowing classes representing primitives into ofType().
Currently char.class still bombs out, since java.lang.Character has neither a valueOf(String) method nor a one-arg String ctor. Maybe this is OK? Using ofType(Character.class) would fail before this change anyways.
If you're OK with char/Character still not counting as "value types" for purposes of option arg conversion, I think the above commit settles it. Let me know what you think.
This seems to good enough. Thanks for the fix.