We Recommend

bash Cookbook: Solutions and Examples for bash Users bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.


Posted By

benjamin on 10/29/09


Tagged

class c cpp


Versions (?)


Class Dependency Graphs for Java


Published in: Bash 


URL: http://www.myoutsourcedbrain.com/2009/04/class-dependency-graphs.html

bash 3-line shell script for visualization of java class dependencies with graphviz. Please see my blog post for details and leave comments there.

  1. echo "digraph G {"> diagram.dot
  2. sed -n -e "s/class [ ]*\([a-zA-Z0-9_]*\)[ ]* extends [ ]*\([a-zA-Z0-9_]*\)[ ]*[{][ ]*/\1 -> \2 ;/p" *.java >> diagram.dot
  3. echo "}" >> diagram.dot

Report this snippet 

You need to login to post a comment.