开发者

Automated way to find number of usages?

开发者 https://www.devze.com 2022-12-18 22:57 出处:网络
Are there any open source tools that automate the functionality of finding the number of usages of a Java API?I can figure out this information for one class at a time in my IDE.I want to use this inf

Are there any open source tools that automate the functionality of finding the number of usages of a Java API? I can figure out this information for one class at a time in my IDE. I want to use this information to create a rudimentary report on the speed of adoption of a particular library. I would create a daily report on the number of usages of dozens of classes, and开发者_StackOverflow I would report on several code bases.


I'd go with one of those tools for analyzing dependencies in Java code. Let it work on your source tree, a package or a single class and see if you can export the results to XML or something like that. I've used Dependency Finder in a project about two years ago and I think it should do what you want. Not sure about the export to XML, though.


In Eclipse you can right click on a method name or class and go to the References menu and from there you can choose the scope of where you want to search for classes that reference that item.

Is that what you need?


I'm going to try Macker. Its style is to report references to configured classes as errors, but that's fine. It can be run from an automated build. Thanks Robert.

0

精彩评论

暂无评论...
验证码 换一张
取 消