Say I have two classes:
public abstract class AbstractFoo {
/**
* Do bar. Subclasses may override this method, it is not required that they do baz.
*/
public void bar() {
// default implementation
}
}
public class ConcreteFoo extends AbstractFoo {
/**
* Do bar. <b>Note:</b> does not do baz, you have to do it yourself.
*/
@Override
public void bar() {
super.bar();
}
}
In the subclass (ConcreteFoo
) I want to override bar()
's javadoc but keep the implementation as in the super class (AbstractFoo
). Is there any way to do this without overriding the method?
No there is absolutely no way of doing that.
You should, however, use the
/**
* {@inheritDoc}
* add whatever you would like here
*/
notation as the implementation javadoc, if you plan on really overriding the method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With