Static methods on interfaces

Stephen Colebourne scolebourne at joda.org
Mon Dec 17 09:25:10 PST 2012


Thanks. The invocation guarantee looks good.
Stephen

On 17 December 2012 17:20, Brian Goetz <brian.goetz at oracle.com> wrote:
> This is the plan of record.  If you're looking for some sort of
> yacht-collateralized guarantee, though, we don't offer those.
>
> More strongly, the only way to invoke a static method on an interface is:
>
>    DeclaringInterfaceName.methodName(args)
>
> Not subinterfaces, not subclasses, not instances.
>
>
> On 12/17/2012 12:10 PM, Stephen Colebourne wrote:
>>
>> Can we (JSR-310 and more generally) rely on static methods in
>> interfaces being in JDK8? It affects a design decision currently in
>> progress ;-)
>>
>>
>> http://mail.openjdk.java.net/pipermail/lambda-dev/2012-December/006969.html
>>
>> Also, can we assume that static methods are in not inherited by
>> implementors (unlike static constants on interfaces)?
>>
>> Stephen
>>
>


More information about the lambda-dev mailing list