Will JDK 8 support SAM that is Abstract Class ?

Boaz Nahum boaznahum at gmail.com
Mon Nov 5 07:08:11 PST 2012


Does it mean that all 'old' inner classes extending adapters cant be
converted to lambda(assuming converting the adapter to SAM)?
Please say no: (

Thanks
Boaz
On Nov 5, 2012 5:01 PM, "Reinier Zwitserloot" <reinier at zwitserloot.com>
wrote:

> 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