initial commit
[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         JavaInspect is a Java library that you can embed into your Java project\r
31         with a few lines of Maven configuration and then visualize any part of\r
32         your Java program structure with few simple JavaInspect API calls at\r
33         application runtime.\r
34 \r
35         <br />\r
36         <br /> JavaInspect uses Java reflection to discover class relations and\r
37         structure and produces GraphViz dot file that describes your\r
38         application. Then launches GraphViz to generate bitmap graph in PNG\r
39         format on your Desktop directory.\r
40 \r
41 \r
42         <h2>Current status</h2>\r
43 \r
44         This is simple utility, quickly written. Tested on Linux (can be\r
45         relatively simply ported to other operating systems too). So far I used\r
46         it for my own needs. There might be bugs and missing features. Feedback\r
47         and code contributions are welcome.\r
48 \r
49 \r
50         <h2>Example graphs</h2>\r
51 \r
52         Example visualization of\r
53         <a href="http://www2.svjatoslav.eu/gitbrowse/sixth/doc/">Sixth</a>\r
54         project:\r
55         <a\r
56                 href="http://www2.svjatoslav.eu/gitbrowse/sixth/doc/architecture%20graphs/index.html">architecture\r
57                 graphs</a>\r
58 \r
59         <br />\r
60         <br /> A very simple example:\r
61         <br />\r
62         <a href="example.png"><img src="example.resized.png" /></a>\r
63 \r
64         <br /> Graph legend:\r
65         <br />\r
66         <img src="legend.png" />\r
67 \r
68 \r
69         <h2>Usage example</h2>\r
70 \r
71         Following example produces graph for JavaInspect itself:\r
72 \r
73         <pre>\r
74 <code>\r
75 // Create graph\r
76 final Graph graph = new Graph();\r
77 \r
78 // Add some object to the graph.\r
79 graph.addObject(graph);\r
80 \r
81 // Add some class to the graph.\r
82 graph.addClass(Utils.class);\r
83 \r
84 // Produce bitmap image titled "JavaInspect.png" to the user Desktop\r
85 // directory.\r
86 graph.generateGraph("JavaInspect", true);\r
87 </code>\r
88 \r
89 \r
90 Result:\r
91     Generated DOT file: <a href="JavaInspect.dot">JavaInspect.dot</a>\r
92     Generated PNG image: <a href="JavaInspect.png">JavaInspect.png</a>\r
93 \r
94 </pre>\r
95 \r
96 \r
97 \r
98         <h2>Embedding JavaInspect in your project</h2>\r
99         <pre>\r
100 \r
101 Declare JavaInspect as dependency:\r
102 \r
103     &lt;dependencies&gt;\r
104 \r
105         ...\r
106 \r
107         &lt;dependency&gt;\r
108             &lt;groupId&gt;eu.svjatoslav&lt;/groupId&gt;\r
109             &lt;artifactId&gt;javainspect&lt;/artifactId&gt;\r
110             &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;\r
111         &lt;/dependency&gt;\r
112  \r
113     &lt;/dependencies&gt;\r
114     \r
115   \r
116   \r
117 Add Maven repository to retrieve artifact from:\r
118   \r
119     &lt;repositories&gt;\r
120         &lt;repository&gt;\r
121             &lt;id&gt;svjatoslav.eu&lt;/id&gt;\r
122             &lt;name&gt;Svjatoslav repository&lt;/name&gt;\r
123             &lt;url&gt;http://www2.svjatoslav.eu/maven/&lt;/url&gt;\r
124         &lt;/repository&gt;\r
125     &lt;/repositories&gt;\r
126 </pre>\r
127 \r
128 \r
129 \r
130 \r
131         <h2>Requirements</h2>\r
132 \r
133         <br>\r
134         <a href="http://www.graphviz.org/">GraphViz</a> - shall be installed on\r
135         the computer.\r
136 \r
137 \r
138 </body>\r
139 </html>\r