I think Uwe's point was about the technical side: @Override on a pure interface method is not fortunately called because it indeed does not need to override any of its superclass methods (it's more like a check for a virtual method slot in the upper type hierarchy).
It would be nice to have something like explicit interface method implementation declarations (C#/.NET). Perhaps in Java10 :) Dawid On Mon, Nov 28, 2011 at 10:49 AM, Robert Muir <[email protected]> wrote: > On Mon, Nov 28, 2011 at 2:51 AM, Uwe Schindler <[email protected]> wrote: > >> In Java 5 interfaces do not support @Override (which is in my opinion >> correct and is horrible that it was introduced in Java 6: @Override on >> interfaces is wrong, as nothing is overridden) > > Actually its a bug in java 5: the javadoc for @Override is unchanged > in java6: 'Indicates that a method declaration is intended to override > a method declaration in a superclass.' > > However the bug is fixed, so that if during refactoring if we removed > some method declarations from an interface during refactoring, you get > a compile error for all the implementing subclasses that should still > be fixed: this seems genuinely useful. > > -- > lucidimagination.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
