Skip to main content

Blog Archive for forax during January 2011

Today, I want to show you a way to implement method invocation with named parameters using JSR 292. But before using JSR 292 API, we need a way to reflect the parameter names of any existing methods. The problem is that java.lang.reflect doesn't provide any way to get those parameter names, so I had to first write a small class that does reflection of parameter names using my second...
When the JSR 292 was started, it was clear that the users of this new API was dynamic(ally typed) languages so the package was naturally named java.dyn But it's is clear now that Java (the language) is also a potential user of this API, by example, the actual plan to implement Java lambda uses several features introduced by JSR 292 (see section 3 of JSR 335). So, the name java.dyn is...
DynamicIndy There is no way to invoke invokedynamic using the Java language. So testing invokedynamic is not that obvious if you don't have your own dynamic language. I've developed a small class DynamicIndy that uses ASM 4.0 (not an official release) to generate a static method that calls invokedynamic. These static method is after converted to a MethodHandle that can be called in Java The...
Happy new year ! We made some interresting progress toward JSR 292 completion. As John already blogged, the latest build of jdk7 (b123) comes with a nearly up to date version of JSR 292 API. This build introduces a new mechanism that allow to send constant arguments to the bootstrap method of an invokedynamic. This blog entry is about how to use this feature to implement lambda to SAM...