Runtime Reverse Engineering with UML

 < Free Open Study > 



You're probably used to reverse-engineering Java code into a UML model. Just feed in some Java source files and you're rewarded with a class diagram that shows the static relationships between the classes in your application.

What about other UML diagrams, such as sequence diagrams, that describe the dynamic behavior of an application? We can draw them up-front to show how we expect the application to behave, but it would be useful if we could reverse-engineer them as well, in order to find out if the actual behavior of the system matched the original design.

Well, we've actually developed a rudimentary runtime reverse-engineering tool that allows you to do just that. Look back at the sample visualizations produced by TraceViewer. We have all the information we need to render a proper UML sequence diagram: a sender object, a message, and a receiver object. With a little more ingenuity we could even come up with something like this:

click to expand

We wouldn't even have to write our own visualization tool; we could simply output the debugging messages in an XML format that could be loaded into a UML tool such as Rational Rose or TogetherJ.



 < Free Open Study > 



Professional Java Servlets 2.3
Professional Java Servlets 2.3
ISBN: 186100561X
EAN: 2147483647
Year: 2006
Pages: 130

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net