简体   繁体   English

为java程序生成调用图 - Eclipse

[英]Generate a call graph for a java program - Eclipse

Is there any sort of support in Eclipse whereby I can programatically generate a static call graph for a single method in a class, at build time? 在Eclipse中是否有任何类型的支持,我可以在构建时以编程方式为类中的单个方法生成静态调用图?

I would like to be able to determine all of the methods that may be potentially called from a given class method. 我希望能够确定可能从给定的类方法调用的所有方法。

I am not interested in a visual graph. 我对视觉图不感兴趣。 I'm looking for an API. 我正在寻找一个API。 It doesn't even have to be Eclipse. 它甚至不必是Eclipse。

Eclipse has something called a Call Hierarchy . Eclipse有一个叫做Call Hierarchy东西。 Highlight your method, right click and select Open Call Hierarchy . 突出显示您的方法,右键单击并选择“ Open Call Hierarchy In addition in Windows you can use the keyboard shortcut CTRL+ALT+H . 此外,在Windows中,您可以使用键盘快捷键CTRL+ALT+H

Call heirarchy and call graph are different. 调用heirarchy和调用图是不同的。 Eclipse "Call Heirarchy" will provide backward trace. Eclipse“Call Heirarchy”将提供反向跟踪。 Where Call graph is forward trace. 调用图是前向跟踪的位置。 "Modal goon" plugin provides this feature. “Modal goon”插件提供此功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM