Will JDK 8 support SAM that is Abstract Class ?

Reinier Zwitserloot reinier at zwitserloot.com
Mon Nov 5 07:00:32 PST 2012


It was part of the original plan, but I believe non-interface SAMs have
been dropped. I'm guessing because it was difficult to handle the peculiars
of working with MethodHandles and not actually making a new instance of the
SAM type.

 --Reinier Zwitserloot



On Mon, Nov 5, 2012 at 3:41 PM, Boaz Nahum <boaznahum at gmail.com> wrote:

> I can't find what the spec is saying, but I remember that Abstract class
> with one abstract method is also SAM.
>
> Currently in b63 I got java: incompatible types: the target type must be a
> functional interface
>
> Will it be supported in the future ?
>
> Thanks
> Boaz
>
>


More information about the lambda-dev mailing list