Lambda and JSR 292 method handle

Neal Gafter neal at gafter.com
Fri Dec 18 06:41:42 PST 2009


On Fri, Dec 18, 2009 at 2:55 AM, Howard Lovatt <howard.lovatt at iee.org>wrote:

> I thought the idea from the JSR 292 group was to use JavaMethodHandle
> [1] (which extends MethodHandle). The difference is that the
> JavaMethodHandle retains the type information, needed by Java, and it
> can implement interfaces so you can use a lambda with an existing
> function.


Do the types representing jsr292's JavaMethodHandle obey subtype
relationships that make them covariant on return type and contravariant on
argument types?  Or, at least, is it possible to use the consistently so
they act that way?

Cheers,
Neal


More information about the lambda-dev mailing list