Is there a way to always execute a function before any other function of a class is called?
I have a class where I need to refresh some fields always before any func
It is better to write another method which will be made protected(accessible to the child classes) which will call first the refresh method and then call the function.
This way the data would be refreshed before the function is called everytime(As per your requirement). eg:
protected void callFunction1(){
refresh();
function();
}
Thanks, Rajesh