hg: lambda/lambda/langtools: Generate all static lambda methods as static. Only interface instance (default) methods still public awaiting VM fixes.
Brian Goetz
brian.goetz at oracle.com
Tue Apr 23 16:38:12 PDT 2013
At the language level, we support in interfaces:
public instance methods (defaults)
public static methods
At the VM level, we further support private versions of both of these. There are no plans to expose private methods in interfaces at the language level at this time.
As Robert points out, VM support is not 100% there so there are some things that are temporarily translated to public when they will eventually be private.
As with classes, lambdas that capture 'this' are desugared to instance methods, otherwise to static methods.
On Apr 23, 2013, at 5:51 PM, Peter Levart wrote:
> Hi,
>
> We have default public instance methods, public static and private
> static methods in interfaces. Will there be private instance methods
> too? In the language or just as implementation detail for translating
> lambda bodies?
>
> Regards, Peter
>
> On 04/23/2013 11:19 PM, robert.field at oracle.com wrote:
>> Changeset: b3a9d8ca17dd
>> Author: rfield
>> Date: 2013-04-23 14:19 -0700
>> URL: http://hg.openjdk.java.net/lambda/lambda/langtools/rev/b3a9d8ca17dd
>>
>> Generate all static lambda methods as static. Only interface instance (default) methods still public awaiting VM fixes.
>>
>> ! src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java
>>
>>
>
>
More information about the lambda-dev
mailing list