public void foo(){
throw new Exception("foo");
}
public void bar(){
foo();
}
Is it possible to inspect the method bar() in order to know that foo() is called without a try catch inside bar()?
You may be interested in wrapping the whole class inside a Proxy and watch it with an InvocationHandler:
http://www.javalobby.org/java/forums/t18631.html
Your InvocationHandler would do something special if it sees that "foo" is called immediatly after "bar", I guess.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With