mercredi 9 septembre 2015

How to find out UML associations from source code with Java reflection

I'm working on a project that will be used to generate class diagrams from Java code. The tool takes jar-files as input and outputs Graphviz dot format files as output.

I know it's simple to find out inheritance and interface implementations using Java reflection with Class#getSuperclass and Class#getInterfaces. But I'm struggling to find out associations, compositions and dependencies. Can it be done with reflection or is there some external library that would help? Any example code you might be able to provide would be of great help.





Aucun commentaire:

Enregistrer un commentaire