Is it possible to add debugging code in a Java method which would determine which client method invoked that particular method using perhaps reflection, in very much the same way the call stack is available in any IDE? Additionally, would it be possible to, in addition to the immediate caller, also produce a recursive call stack all the way down to the bottom level caller (e.g. a main
method)?
Asked
Active
Viewed 47 times
1

amphibient
- 29,770
- 54
- 146
- 240
-
2Is this what you are looking for? http://stackoverflow.com/questions/1069066/get-current-stack-trace-in-java – Vasu Jan 09 '14 at 00:54