I would like to override some of the driver and app "common" methods. Well, overriding them is easy enough, but from the overridden method, is there a way to call the original method?
Overriding the driver methods is easy, as I can prefix the call with "driver." to get to the internal method. For common methods, is there an reference to the common method, like there is for driver?
Example:
// overridden method
void unschedule(handlerMethod) {
// do something special, then
super.unschedule(handlerMethod)
}
I already realize I can just create a method of a different name, but I want to override it, so that the new logic is inherited by all the calls to this original method that are made against my code.
Here is my actual code:
// override the unschedule method
void unscheduleQuery(handlerMethod) {
volatileAtomicState[handlerMethod] = false
unschedule(handlerMethod)
}
// override the runIn scheduler method
void runQueryIn(Long delayInSeconds, String handlerMethod, Map options = null) {
volatileAtomicState[handlerMethod] = true
runIn(delayInSeconds, handlerMethod, options)
}
If I rename unscheduleQuery to unschedule, how do I still call the common unschedule method?