Package Dependency

2019-03-26 06:45发布

问题:

I have a huge Java Application with numerous packages. Some of the classes in these packages have dependency on classes in other packages. Given a class, I want to know all the dependent classes on it and vice-versa. A GUI tool should be really helpful.

回答1:

There's some useful tools described here for the (free) Eclipse IDE. There's also more info on dependency tools with a comparison against depfinder here.



回答2:

CDA - Class Dependency Analyzer is incredibly simple to use, and can help you visualize those dependencies between packages and classes.



回答3:

I would also recommend Eclipse as there are various plugins for this task. For example ispace which can create a graphical representation of the package dependencies.

I general the Source code analyzer section of eclipse's market place has more plugins in that direction.



回答4:

Another option is Degraph: https://github.com/schauder/degraph (I'm the author, so this is obviously a shameless plug)



回答5:

You can test JavaDepend, it provides many useful features for dependency needs.