In addition to reflection, you may be interested in AOP (for example, through AspectJ ), which allows before and after processing method calls, conversions, hooks, etc. different Java execution sequences.
It is not possible to intercept calls to methods that do not exist, since such code cannot be compiled.
source share