field type is not final in MethodHandle

John Rose john.r.rose at oracle.com
Thu Apr 7 15:01:55 PDT 2011


On Apr 7, 2011, at 12:11 PM, Rémi Forax wrote:

> Hi gang, hi John,
> I've just found that MethodHandle.type is not declared final.


Hi Remi.

Since there will be no way for users to specify their own subclasses or access implementation subclasses, I don't think this matters.  We are leaving "final" off of methods in MethodHandle in order to allow implementors the option of specializing behavior.

(Exception: The signature-polymorphic methods, which the JVM treats specially, are marked as final natives.  If implementors want to get some benefit by overriding these, they will have to cooperate with the JVM magically anyway.)

Is there a problem with this?

-- John


More information about the mlvm-dev mailing list