Is it possible to call a super static method from child static method?
I mean, in a generic way, so far now I have the following:
public class BaseCo
The official name of your implementation is called method hiding. I would suggest introducing a static init(Controller controller) method, and calling an instance method to take advantage of overriding.
public class Controller {
static void init(Controller controller) {
controller.init();
}
void init() {
//init stuff
}
}
public class BaseController extends Controller {
@override
void init() {
super.init();
//base controller init stuff
}
}
public class ChildController extends BaseController {
@override
void init() {
super.init();
//child controller init stuff
}
}
You can then call Controller.init(controllerInstance).