Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] problem with inter-type declaration - inserting a method override

On Mon, 6 Dec 2004, George Harley1 wrote:

> I think there is still something more to be explained here though.  Just
> as I was about to press send on the above response, I noticed that, with
> your original code still in place, removing the implementation of
> toString() from BaseClass resulted in the compiler error going away. Which
> is surprising (to me anyway) since the class SubclassData is surely still
> inheriting the toString() method from its more distant ancestor
> java.lang.Object. Perhaps java.lang.Object is a special case in the Java
> conflict resolution rules. Now, where did I put that language spec ... ?

java.lang.Object is an explicit base class of every interface, so
the interface methods will be viewed as overriding the toString
method from there.

Cheers,

Ganesh



Back to the top