PROPOSAL: Method and Field Literals
Patrick Wright
pdoubleya at gmail.com
Wed Mar 11 00:44:07 PDT 2009
>> The proposal uses java.lang.reflect.Field and java.lang.reflect.Method,
>> I would prefer java.lang.reflect.Property and java.dyn.MethodHandle.
>> (with java.lang.reflect.Property a pair of method handles (getter/setter)).
>
I agree that MethodHandle[1] may well be a better option. As far as I
understand the MH and related work (for the InvokeDynamic JSR),
invocation through a MethodHandle should be much faster than via
Method and standard reflection.
Personally, I find # a little ugly. I realize this is used within
JavaDoc, but I personally don't read a lot of raw JD so am not used to
it. I don't have an alternative to suggest but I hope someone else
does :).
Patrick
1- http://blogs.sun.com/jrose/entry/method_handles_in_a_nutshell,
among other docs, try googling
More information about the coin-dev
mailing list