Find out which classes of a given API are used

后端 未结 8 909
鱼传尺愫
鱼传尺愫 2020-11-29 06:20

In a Java Project of mine, I would like to find out programmatically which classes from a given API are used. Is there a good way to do that? Through source code parsing or

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-29 06:57

    If you use Eclipse. Try using the profiling tools. It doesn't only tells which classes are being used, but tells much more about it. The results will be something like:

    alt text

    There is a very good quickstart at:

    http://www.eclipse.org/tptp/home/documents/tutorials/profilingtool/profilingexample_32.html

提交回复
热议问题