defender methods and method of Object

Neal Gafter neal at gafter.com
Sat Mar 10 13:01:26 PST 2012


On Sat, Mar 10, 2012 at 5:06 AM, David Holmes <david.holmes at oracle.com>wrote:

> On 10/03/2012 3:56 AM, Dan Smith wrote:
> > Yes, I've been thinking the same thing.  Since the Object methods are
> morally members of every interface, it would make sense that a default
> method could effectively override them, and the "throw out all super
> methods that have already been overridden" rule could then apply.  It all
> depends on what order the inheritance conflict-resolution rules are applied
> in.
>
> If you go down this path then you are throwing away the "superclass
> implementation always wins" rule - in which case what rule are you going
> to replace that with?
>

I suspect the rule that Dan is imagining is something like "superclass
implementation always wins (except for Object implementation); if none then
interface implementation wins; if none then Object implementation wins."


More information about the lambda-dev mailing list