updated manual to reflect latest version
[javainspect.git] / doc / index.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\r
2 <html>\r
3 <head>\r
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\r
5 <title>JavaInspect</title>\r
6 </head>\r
7 <body>\r
8         <h1>JavaInspect - Utility to visualize java software</h1>\r
9         <a\r
10                 href="http://www2.svjatoslav.eu/gitweb/?p=javainspect.git;a=snapshot;h=HEAD;sf=tgz">Download</a>\r
11         &nbsp;&nbsp;\r
12         <a\r
13                 href="http://www2.svjatoslav.eu/gitbrowse/javainspect/doc/index.html">Online\r
14                 homepage</a> &nbsp;&nbsp;\r
15         <a href="http://svjatoslav.eu/programs.jsp">Other applications\r
16                 hosted on svjatoslav.eu</a>\r
17         <pre>\r
18 <b>Program author:</b>\r
19     Svjatoslav Agejenko\r
20     Homepage: <a href="http://svjatoslav.eu">http://svjatoslav.eu</a>\r
21     Email: <a href="mailto:svjatoslav@svjatoslav.eu">svjatoslav@svjatoslav.eu</a>\r
22 \r
23 This software is distributed under <a\r
24                         href="http://www.gnu.org/licenses/gpl-2.0.html">GNU GENERAL PUBLIC LICENSE Version 2</a>.\r
25 \r
26 </pre>\r
27 \r
28         <h2>General</h2>\r
29 \r
30         Goal: simplify/speed up understanding the computer program code by\r
31         automatically visualizing its structure.\r
32           \r
33         <br/><br/>\r
34         JavaInspect is a Java library that you can embed into your Java project\r
35         with a few lines of Maven configuration and then visualize any part of\r
36         your Java program structure with few simple JavaInspect API calls at\r
37         application runtime.\r
38 \r
39         <br />\r
40         <br /> JavaInspect uses Java reflection to discover class relations and\r
41         structure and produces GraphViz dot file that describes your\r
42         application. Then launches GraphViz to generate bitmap graph in PNG\r
43         format on your Desktop directory.\r
44 \r
45 \r
46         <h2>Current status</h2>\r
47 \r
48         This is simple utility, quickly written. Tested on Linux (can be\r
49         relatively simply ported to other operating systems too). So far I used\r
50         it for my own needs. There might be bugs and missing features. Feedback\r
51         and code contributions are welcome.\r
52 \r
53 \r
54         <h2>Example graphs</h2>\r
55 \r
56         Example visualization of\r
57         <a href="http://www2.svjatoslav.eu/gitbrowse/sixth/doc/">Sixth</a>\r
58         project:\r
59         <a\r
60                 href="http://www2.svjatoslav.eu/gitbrowse/sixth/doc/architecture%20graphs/index.html">architecture\r
61                 graphs</a>\r
62 \r
63         <br />\r
64         <br /> A very simple example:\r
65         <br />\r
66         <a href="example.png"><img src="example.resized.png" /></a>\r
67 \r
68         <br /> Graph legend:\r
69         <br />\r
70         <img src="legend.png" />\r
71 \r
72 \r
73         <h2>Usage example</h2>\r
74 \r
75         Following example produces graph for JavaInspect itself:\r
76 \r
77         <pre>\r
78 \r
79 <code>\r
80 // Create graph\r
81 final ClassGraph graph = new ClassGraph();\r
82 \r
83 // Add some object to the graph.\r
84 graph.addObject(graph);\r
85 \r
86 // Add some class to the graph.\r
87 graph.addClass(Utils.class);\r
88 \r
89 // Produce bitmap image titled "JavaInspect.png" to the user Desktop\r
90 // directory.\r
91 graph.generateGraph("JavaInspect", true);\r
92 </code>\r
93 \r
94 \r
95 Result:\r
96     Generated DOT file: <a href="JavaInspect.dot">JavaInspect.dot</a>\r
97     Generated PNG image: <a href="JavaInspect.png">JavaInspect.png</a>\r
98 \r
99 </pre>\r
100 \r
101 \r
102 \r
103         <h2>Embedding JavaInspect in your project</h2>\r
104         <pre>\r
105 \r
106 Declare JavaInspect as dependency:\r
107 \r
108     &lt;dependencies&gt;\r
109 \r
110         ...\r
111 \r
112         &lt;dependency&gt;\r
113             &lt;groupId&gt;eu.svjatoslav&lt;/groupId&gt;\r
114             &lt;artifactId&gt;javainspect&lt;/artifactId&gt;\r
115             &lt;version&gt;1.1&lt;/version&gt;\r
116         &lt;/dependency&gt;\r
117  \r
118     &lt;/dependencies&gt;\r
119     \r
120   \r
121   \r
122 Add Maven repository to retrieve artifact from:\r
123   \r
124     &lt;repositories&gt;\r
125         &lt;repository&gt;\r
126             &lt;id&gt;svjatoslav.eu&lt;/id&gt;\r
127             &lt;name&gt;Svjatoslav repository&lt;/name&gt;\r
128             &lt;url&gt;http://www2.svjatoslav.eu/maven/&lt;/url&gt;\r
129         &lt;/repository&gt;\r
130     &lt;/repositories&gt;\r
131 </pre>\r
132 \r
133 \r
134 \r
135 \r
136         <h2>Requirements</h2>\r
137 \r
138         <br>\r
139         <a href="http://www.graphviz.org/">GraphViz</a> - shall be installed on\r
140         the computer.\r
141 \r
142 \r
143 </body>\r
144 </html>\r