MethodType cache and class unloading

John Rose John.Rose at Sun.COM
Wed Oct 29 16:22:49 PDT 2008


On Oct 29, 2008, at 1:07 PM, Rémi Forax wrote:
>     MethodHandle findVirtual(Object target, String name, MethodType  
> type)
> This trick should avoid to create a MethodType with temporary type.

That's very good.  I like it partly because it guides implementors  
toward the main use cases.

One nit:  It should not be called findVirtual, since the two  
overloadings (class vs. object) would not be semantically  
consistent.  A fine name for this function would be findMethod, since  
there is nothing "virtual" about the method lookup, because the  
receiver is fully known.

-- John



More information about the mlvm-dev mailing list