Huw Evans wrote:
So, you need to check the need to do something with the primitive type, and instead of call Class.forName(<primitive type name>), you need to call the appropriate wrapper.TYPE.Thank you for the tip, I didn't realize that was available in the wrapper classes too. I do end up having to create a map of some sort to get from the string representation to the actual class still. Jouzas' code captures this issue (thank you!).
This is a pain, I agree, and it is a little sucky, I agree. However, it does do the job :) Don't get me started on the use of primitives in Java, it's one of my favourite rants about the language :)It's just amazing to me, I bet this one little issue with Class.classForName(...) and primitives probibly creates "hundreds of thousands" of extra lines of replicated javacode spanning many Java Development Projects the world over.
Huw
-Mark
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
