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: v_borchert@despammed.com (Volker Borchert) Newsgroups: comp.lang.java.programmer Subject: Re: Use of @Override when implementing interfaces Date: 7 Dec 2013 10:54:09 GMT Organization: Private site at Eddersheim, Germany Lines: 23 Distribution: world Message-ID: References: X-Trace: individual.net 82jK8tIQKUQKa71/Sd+JuQU91fZFnUZ/obC1u9j7yax4q0EV0m Cancel-Lock: sha1:cn23xzZJIznaJD+v9M+NN5cxvOE= Xref: csiph.com comp.lang.java.programmer:26760 Wayne wrote: > On 12/7/2013 2:14 AM, Volker Borchert wrote: > > > > For that reason, 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. > > > > Instead of that, why not create your own annotation, something like: > > @From("MyInterface") > @Override > public void someMethod () { ... } Too verbose, too non-standardized, and too error-prone. @Override gives a compile-time error if the mothods actually doesn't override something. -- "I'm a doctor, not a mechanic." Dr Leonard McCoy "I'm a mechanic, not a doctor." Volker Borchert