we have a SOA system built on top of EJB 3.0. we are manually maintaining a “service overview map” which shows which business services call which domain services. this is tedious, error prone and nobody wants to do it :-/
that’s why i am looking for a way to automate the generation of these diagrams. i think code analysis is the way to go.
does anybody know of a tool that does good code analysis for java? i think of some kind of meta model which i can query to built the graph.
something like:
- parse all files from root dir xyz and built the meta model for each class
a) e.g. which other classes does it use
b) which classes use this class
c) which interfaces does it implement
d) what is it’s filename
e) and so on, i guess you know what i mean - give me a meta model of all the files you found (java/class)
- generate the graph (hand made)
- output the graph in “.dot” (directed graph) file format
- use the “dot” tool to generate the graph as png, pdf, svg…
we already have a simple solution by “grepping” through the files…. but this is not perfect.
any help would be appreciated
cheers
marcel
Hah. I wrote this exact system not one month ago for our EJB 2.0 behemoth. Here is what I did:
It took me about a week and it proved very successful when I updated it to output the files as .svg images via the twopi engine; we can now navigate class diagrams in the browser to quickly identify areas of interest for potential refactoring, and are integrating it into our automated build environment.
Drop me a pm if you need more info.