In Java, I'd like to monitor state of annotated fields and method's return values. How do I execute a callback on an annotated field value / method return values.
What I'm trying to do : Creating a custom debugger of a sort which would execute some validations on runtime.
Ex:
@ObservableMethod
CashFlowSet getCashFlows() {
@ObservableField
CashFlowSet set = generateFlows();
}
During runtime, I'd like to have a callback on every time the value of set changes and every time getCashFlows() exit the call stack.