Stateless traits & default interface methods question

Zhong Yu zhong.j.yu at
Wed Nov 13 12:03:20 PST 2013

I certainly hope it's the later - the interface and the class could be
distributed by different parties; changing an implementation detail on
the interface should not require recompiling all subclasses.

Zhong Yu

On Wed, Nov 13, 2013 at 10:49 AM, Matthew Adams <matthew at> wrote:
> _Note: This may be a FAQ.  RTFMs are fine._
> I have a question about default interface methods, thinking in terms of
> stateless traits.
> Assume at time t0 I define an interface I with a given default method
> implementation and class C implements I.  Later, at time t1, I modify the
> implementations of I's default methods _without_ recompiling C.  The next
> time that I execute a method on C that came from a default method on I, do
> I get I's implementation as it was at t0 or t1?
> In other words, are default method implementations woven into classes at
> compile time, do classes delegate to the interface's default method
> implementation at runtime, or is it via some other mechanism?
> -matthew
> --
> mailto:matthew at <matthew at>
> skype:matthewadams12
> googletalk:matthew at

More information about the lambda-dev mailing list