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
unfortunately, there's no way to require it at compile time, and no way to detect it at runtime (unless there is some app specific logic or sequence of events that you could use to detect the method not being called). best thing to do is heavily document the method.
if you really, really want to go down this path, you could use something like this pattern:
public class BaseClass {
public final void myMethod() {
// do special stuff here which must always happen ...
// allow subclasses to customize myMethod() here
myMethodCustom();
}
protected void myMethodCustom() {
// base class does nothing
}
}