Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Fredrik Jonson Newsgroups: comp.lang.java.programmer Subject: Re: Use of @Override when implementing interfaces Date: 9 Dec 2013 12:59:15 GMT Lines: 22 Message-ID: References: X-Trace: individual.net yTO1IOASx2VkAoLt2RtkOg6+ppnykhBA7xRHG4PR+d5bfeBAw= Cancel-Lock: sha1:kJ7+TARmrxocTjSJj+p0icW215Y= User-Agent: slrn/pre1.0.0-18 (Linux) Xref: csiph.com comp.lang.java.programmer:26799 In Volker Borchert wrote: > I'd even like @Override to allow a value indicating the class or > interface where the overridden method lives. For now, I'm (ab-)using > @see javadoc for this purpose, but that isn't part of the method's > signature and therefore doesn't show up as prominently in IDEs' code > completion suggestions etc. I can see the point. I'd prefer a separate annotation for implemented interface methods - say @Implement(Runnable.class) - but that'd mostly be valuable if it also was a widely available standard annotation, like @Override. And yes, I like the @see approach, but indeed it isn't notable enough. Not in a "if it compiles, ship it" situation anyway. :) Having seen the discussion in this thread I think I'll be more lenient towards @Override on interface methods, though I still think I prefer the reduced clutter of leaving them out. -- Fredrik Jonson