Parameter « primitive « Java Data Type Q&A





1. Passing primitive types as out param in Java    stackoverflow.com

I need to return/update a boolean while returning a list of stuff from a method. Java can't return tuples and I didn’t want to make a separate class for this, ...

2. Reflection & primitive method parameters    coderanch.com

Been a while but I think it should be possible. Why not do it the other way around: use reflection to get a list of the Method objects, then look at each Method and find out it getParameterTypes? You'll get two methods, you can get the array of classes they accept then you should be able to reverse engineer your own ...

3. How to use Class.getMethod() by primitive type parameter?    coderanch.com

Here's an exercise I did in reflection, inspired by a magazine article with a great idea and code that made me wince. You might step through ThingTester with a debugger and see how it handles int and Integer parameters. I guess I should post a ZIP of the source as well as the HTML version. Something to do tomorrow night. (Kill ...