That works for longs but not shorts or ints. I could add equivalent int and long helper functions but they are only likely to be called by the 3 existing intValue() shortValue() and longValue() methods?
The reason I expect these methods don't have a life outside of "helping" these 3 functions is because they rely on the parser being positioned at the relevant point for the value from doDoubleValue() call to correlate with the "result" param passed in. Am I missing something?
I tried writing a generic helper method based on Number but didn't like that either