I want that when a child class overrides a method in a parent class, the super.method()
is called in that child method.
Is there any way to check this a
Look at the findBugs project ...
Example ...
import javax.annotation.OverridingMethodsMustInvokeSuper;
:
@OverridingMethodsMustInvokeSuper
protected String getLabel(){
...
}
Override:
@Override
protected String getLabel(){
// no call to Super Class!!
// gives a message
...
}
I've been using it for about 3 years. No kittens have been harmed.