i used java reflections to get methods from a class(loaded those classes).Now i want to get the call hierarchy of those methods.How can i use call hierarchy option in eclipse IDE for that?any examples or links????
i used java reflections to get methods from a class(loaded those classes).Now i want
Share
The solutions proposed is to use
Thread.currentThread().getStackTrace()in order to obtain the current trace of callers.However, you want to get this information not for the currently executing method, but for any method on any class. This can’t be done easily. I think you have to inspect all classes on the classpath with a bytecode utility and match the calling instructions. Something you will spend too much time on, and I’m pretty sure it isn’t needed, unless you are developing an IDE.
Anyway, you can get Eclipse or NetBeans sources and see how it is implemented there.