1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
6 <!-- 2022-02-20 Sun 20:27 -->
7 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8 <meta name="viewport" content="width=device-width, initial-scale=1" />
9 <title>JavaInspect - Utility to visualize java software</title>
10 <meta name="generator" content="Org mode" />
11 <meta name="author" content="Svjatoslav Agejenko" />
12 <style type="text/css">
13 <!--/*--><![CDATA[/*><!--*/
14 .title { text-align: center;
15 margin-bottom: .2em; }
16 .subtitle { text-align: center;
20 .todo { font-family: monospace; color: red; }
21 .done { font-family: monospace; color: green; }
22 .priority { font-family: monospace; color: orange; }
23 .tag { background-color: #eee; font-family: monospace;
24 padding: 2px; font-size: 80%; font-weight: normal; }
25 .timestamp { color: #bebebe; }
26 .timestamp-kwd { color: #5f9ea0; }
27 .org-right { margin-left: auto; margin-right: 0px; text-align: right; }
28 .org-left { margin-left: 0px; margin-right: auto; text-align: left; }
29 .org-center { margin-left: auto; margin-right: auto; text-align: center; }
30 .underline { text-decoration: underline; }
31 #postamble p, #preamble p { font-size: 90%; margin: .2em; }
32 p.verse { margin-left: 3%; }
34 border: 1px solid #ccc;
35 box-shadow: 3px 3px 3px #eee;
37 font-family: monospace;
49 background-color: white;
53 border: 1px solid black;
55 pre.src:hover:before { display: inline; margin-top: 14px;}
56 /* Languages per Org manual */
57 pre.src-asymptote:before { content: 'Asymptote'; }
58 pre.src-awk:before { content: 'Awk'; }
59 pre.src-C:before { content: 'C'; }
60 /* pre.src-C++ doesn't work in CSS */
61 pre.src-clojure:before { content: 'Clojure'; }
62 pre.src-css:before { content: 'CSS'; }
63 pre.src-D:before { content: 'D'; }
64 pre.src-ditaa:before { content: 'ditaa'; }
65 pre.src-dot:before { content: 'Graphviz'; }
66 pre.src-calc:before { content: 'Emacs Calc'; }
67 pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
68 pre.src-fortran:before { content: 'Fortran'; }
69 pre.src-gnuplot:before { content: 'gnuplot'; }
70 pre.src-haskell:before { content: 'Haskell'; }
71 pre.src-hledger:before { content: 'hledger'; }
72 pre.src-java:before { content: 'Java'; }
73 pre.src-js:before { content: 'Javascript'; }
74 pre.src-latex:before { content: 'LaTeX'; }
75 pre.src-ledger:before { content: 'Ledger'; }
76 pre.src-lisp:before { content: 'Lisp'; }
77 pre.src-lilypond:before { content: 'Lilypond'; }
78 pre.src-lua:before { content: 'Lua'; }
79 pre.src-matlab:before { content: 'MATLAB'; }
80 pre.src-mscgen:before { content: 'Mscgen'; }
81 pre.src-ocaml:before { content: 'Objective Caml'; }
82 pre.src-octave:before { content: 'Octave'; }
83 pre.src-org:before { content: 'Org mode'; }
84 pre.src-oz:before { content: 'OZ'; }
85 pre.src-plantuml:before { content: 'Plantuml'; }
86 pre.src-processing:before { content: 'Processing.js'; }
87 pre.src-python:before { content: 'Python'; }
88 pre.src-R:before { content: 'R'; }
89 pre.src-ruby:before { content: 'Ruby'; }
90 pre.src-sass:before { content: 'Sass'; }
91 pre.src-scheme:before { content: 'Scheme'; }
92 pre.src-screen:before { content: 'Gnu Screen'; }
93 pre.src-sed:before { content: 'Sed'; }
94 pre.src-sh:before { content: 'shell'; }
95 pre.src-sql:before { content: 'SQL'; }
96 pre.src-sqlite:before { content: 'SQLite'; }
97 /* additional languages in org.el's org-babel-load-languages alist */
98 pre.src-forth:before { content: 'Forth'; }
99 pre.src-io:before { content: 'IO'; }
100 pre.src-J:before { content: 'J'; }
101 pre.src-makefile:before { content: 'Makefile'; }
102 pre.src-maxima:before { content: 'Maxima'; }
103 pre.src-perl:before { content: 'Perl'; }
104 pre.src-picolisp:before { content: 'Pico Lisp'; }
105 pre.src-scala:before { content: 'Scala'; }
106 pre.src-shell:before { content: 'Shell Script'; }
107 pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
108 /* additional language identifiers per "defun org-babel-execute"
110 pre.src-cpp:before { content: 'C++'; }
111 pre.src-abc:before { content: 'ABC'; }
112 pre.src-coq:before { content: 'Coq'; }
113 pre.src-groovy:before { content: 'Groovy'; }
114 /* additional language identifiers from org-babel-shell-names in
115 ob-shell.el: ob-shell is the only babel language using a lambda to put
116 the execution function name together. */
117 pre.src-bash:before { content: 'bash'; }
118 pre.src-csh:before { content: 'csh'; }
119 pre.src-ash:before { content: 'ash'; }
120 pre.src-dash:before { content: 'dash'; }
121 pre.src-ksh:before { content: 'ksh'; }
122 pre.src-mksh:before { content: 'mksh'; }
123 pre.src-posh:before { content: 'posh'; }
124 /* Additional Emacs modes also supported by the LaTeX listings package */
125 pre.src-ada:before { content: 'Ada'; }
126 pre.src-asm:before { content: 'Assembler'; }
127 pre.src-caml:before { content: 'Caml'; }
128 pre.src-delphi:before { content: 'Delphi'; }
129 pre.src-html:before { content: 'HTML'; }
130 pre.src-idl:before { content: 'IDL'; }
131 pre.src-mercury:before { content: 'Mercury'; }
132 pre.src-metapost:before { content: 'MetaPost'; }
133 pre.src-modula-2:before { content: 'Modula-2'; }
134 pre.src-pascal:before { content: 'Pascal'; }
135 pre.src-ps:before { content: 'PostScript'; }
136 pre.src-prolog:before { content: 'Prolog'; }
137 pre.src-simula:before { content: 'Simula'; }
138 pre.src-tcl:before { content: 'tcl'; }
139 pre.src-tex:before { content: 'TeX'; }
140 pre.src-plain-tex:before { content: 'Plain TeX'; }
141 pre.src-verilog:before { content: 'Verilog'; }
142 pre.src-vhdl:before { content: 'VHDL'; }
143 pre.src-xml:before { content: 'XML'; }
144 pre.src-nxml:before { content: 'XML'; }
145 /* add a generic configuration mode; LaTeX export needs an additional
146 (add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
147 pre.src-conf:before { content: 'Configuration File'; }
149 table { border-collapse:collapse; }
150 caption.t-above { caption-side: top; }
151 caption.t-bottom { caption-side: bottom; }
152 td, th { vertical-align:top; }
153 th.org-right { text-align: center; }
154 th.org-left { text-align: center; }
155 th.org-center { text-align: center; }
156 td.org-right { text-align: right; }
157 td.org-left { text-align: left; }
158 td.org-center { text-align: center; }
159 dt { font-weight: bold; }
160 .footpara { display: inline; }
161 .footdef { margin-bottom: 1em; }
162 .figure { padding: 1em; }
163 .figure p { text-align: center; }
164 .equation-container {
170 vertical-align: middle;
175 vertical-align: middle;
179 border: 2px solid gray;
184 { text-align: right; font-size: 70%; white-space: nowrap; }
185 textarea { overflow-x: auto; }
186 .linenr { font-size: smaller }
187 .code-highlighted { background-color: #ffff00; }
188 .org-info-js_info-navigation { border-style: none; }
189 #org-info-js_console-label
190 { font-size: 10px; font-weight: bold; white-space: nowrap; }
191 .org-info-js_search-highlight
192 { background-color: #ffff00; color: #000000; font-weight: bold; }
193 .org-svg { width: 90%; }
196 <link href="https://bootswatch.com/3/darkly/bootstrap.min.css" rel="stylesheet">
197 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
198 <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js"></script>
199 <style type="text/css">
200 footer {background-color: #111 !important;}
201 pre {background-color: #111; color: #ccc;}
203 <link rel="stylesheet" type="text/css" href="https://thomasf.github.io/solarized-css/solarized-dark.min.css" />
204 <script type="text/javascript">
205 // @license magnet:?xt=urn:btih:e95b018ef3580986a04669f1b5879592219e2a7a&dn=public-domain.txt Public Domain
206 <!--/*--><![CDATA[/*><!--*/
207 function CodeHighlightOn(elem, id)
209 var target = document.getElementById(id);
211 elem.classList.add("code-highlighted");
212 target.classList.add("code-highlighted");
215 function CodeHighlightOff(elem, id)
217 var target = document.getElementById(id);
219 elem.classList.remove("code-highlighted");
220 target.classList.remove("code-highlighted");
229 <h1 class="title">JavaInspect - Utility to visualize java software</h1>
230 <div id="table-of-contents">
231 <h2>Table of Contents</h2>
232 <div id="text-table-of-contents">
234 <li><a href="#orga6751f6">1. General</a>
236 <li><a href="#org926416f">1.1. Source code</a></li>
239 <li><a href="#org65fe059">2. Goal and operating principle</a></li>
240 <li><a href="#org7fe659d">3. Example graphs</a></li>
241 <li><a href="#org163c1cb">4. Installation</a></li>
242 <li><a href="#orgaa497bf">5. Usage</a>
244 <li><a href="#org68d4e58">5.1. Usage as commandline utility</a>
246 <li><a href="#org4c2e5f8">5.1.1. Available commandline arguments</a></li>
247 <li><a href="#orgceb0cbf">5.1.2. Specifying classes to render</a></li>
250 <li><a href="#org8037e80">5.2. Usage via Java API</a>
252 <li><a href="#org56db96c">5.2.1. Example 1: individually picked objects</a></li>
253 <li><a href="#org419624a">5.2.2. Example 2: GraphViz embedded in another project</a></li>
254 <li><a href="#orgdf4f0b1">5.2.3. Embedding JavaInspect in your Maven project</a></li>
259 <li><a href="#org556c7e2">6. TO DO</a></li>
260 <li><a href="#orgf7baf29">7. See also</a></li>
265 <div id="outline-container-orga6751f6" class="outline-2">
266 <h2 id="orga6751f6"><span class="section-number-2">1</span> General</h2>
267 <div class="outline-text-2" id="text-1">
269 <li>This program is free software: you can redistribute it and/or modify
270 it under the terms of the <a href="https://www.gnu.org/licenses/lgpl.html">GNU Lesser General Public License</a> as
271 published by the Free Software Foundation, either version 3 of the
272 License, or (at your option) any later version.</li>
276 <li>Svjatoslav Agejenko
278 <li>Homepage: <a href="https://svjatoslav.eu">https://svjatoslav.eu</a></li>
279 <li>Email: <a href="mailto://svjatoslav@svjatoslav.eu">mailto://svjatoslav@svjatoslav.eu</a></li>
280 <li><a href="https://www.svjatoslav.eu/projects/">Other software projects hosted at svjatoslav.eu</a></li>
285 <li>GitHub fork for the project:
286 <a href="https://github.com/abargnesi/javainspect">https://github.com/abargnesi/javainspect</a></li>
292 <div id="outline-container-org926416f" class="outline-3">
293 <h3 id="org926416f"><span class="section-number-3">1.1</span> Source code</h3>
294 <div class="outline-text-3" id="text-1-1">
296 <li><a href="https://www2.svjatoslav.eu/gitweb/?p=javainspect.git;a=snapshot;h=HEAD;sf=tgz">Download latest snapshot in TAR GZ format</a></li>
298 <li><a href="https://www2.svjatoslav.eu/gitweb/?p=javainspect.git;a=summary">Browse Git repository online</a></li>
301 Clone Git repository using command:
303 <pre class="example">
304 git clone https://www2.svjatoslav.eu/git/javainspect.git
311 <div id="outline-container-org65fe059" class="outline-2">
312 <h2 id="org65fe059"><span class="section-number-2">2</span> Goal and operating principle</h2>
313 <div class="outline-text-2" id="text-2">
315 Goal: simplify/speed up understanding the computer program code by
316 automatically visualizing its structure.
320 <a href="https://www3.svjatoslav.eu/projects/sixth-3d/graphs/">See example produced graphs</a> for <a href="https://www3.svjatoslav.eu/projects/sixth-3d/">Sixth 3D - 3D engine project</a>.
324 JavaInspect can be used as a <a href="#org68d4e58">standalone commandline utility</a> as well as
325 <a href="#org8037e80">java library</a>. JavaInspect uses primarily Java built-in reflection to
326 discover and visualize any part of Java program.
330 JavaInspect currently has no graphical user interface, configuration
331 files, embedded scripting support, direct Maven, Gradle or Ant
332 integration. See <a href="#orgaa497bf">usage</a> to learn how to instuct Javainspect what to do.
336 After discovering application structure and optionally filtering out
337 unimportant parts, JavaInspect produces GraphViz dot file that
338 describes data to be visualized. Then launches <a href="https://graphviz.org/">GraphViz</a> to generate
339 bitmap graph in PNG or SVG format.
346 <li>JavaInspect is developed and tested so far only on GNU/Linux.</li>
351 <div id="outline-container-org7fe659d" class="outline-2">
352 <h2 id="org7fe659d"><span class="section-number-2">3</span> Example graphs</h2>
353 <div class="outline-text-2" id="text-3">
356 A very simple example:
360 <div id="org5c02965" class="figure">
361 <p><a href="example.png"><img src="example-thumbnail.png" alt="example-thumbnail.png" /></a>
370 <div id="org32c854a" class="figure">
371 <p><img src="legend.png" alt="legend.png" />
378 <li><a href="https://www3.svjatoslav.eu/projects/sixth-3d/graphs/">See example produced graphs</a> for <a href="https://www3.svjatoslav.eu/projects/sixth-3d/">Sixth 3D - 3D engine project</a>.</li>
383 <div id="outline-container-org163c1cb" class="outline-2">
384 <h2 id="org163c1cb"><span class="section-number-2">4</span> Installation</h2>
385 <div class="outline-text-2" id="text-4">
387 <a href="http://www.graphviz.org/">GraphViz</a> - shall be installed on the computer.
391 On Ubuntu/Debian GraphViz can be installed using:
393 <div class="org-src-container">
394 <pre class="src src-sh">sudo apt-get install graphviz
399 To use JavaInspect via Java API, no further installation is
400 needed. JavaInspect will be embedded into your project as dependency.
401 This is described in <a href="#org8037e80">usage via Java API</a>. It will expect GraphViz to be
402 available in the system.
406 To use JavaInspect as a commandline tool, JavaInspect source
407 repository has to be cloned locally: See <a href="#org926416f">Source code</a>.
411 Then study and execute installation script:
413 <pre class="example">
414 commandline launcher/install
419 After installation, new commandline tool should be available
421 <pre class="example">
427 Quick commandline usage help can be viewed by issuing
429 <pre class="example">
435 <div id="outline-container-orgaa497bf" class="outline-2">
436 <h2 id="orgaa497bf"><span class="section-number-2">5</span> Usage</h2>
437 <div class="outline-text-2" id="text-5">
439 JavaInspect can be controlled in 2 different ways:
442 <li><a href="#org68d4e58">as standalone commandline utility</a></li>
443 <li><a href="#org8037e80">as embedded Java library via Java API</a></li>
447 <div id="outline-container-org68d4e58" class="outline-3">
448 <h3 id="org68d4e58"><span class="section-number-3">5.1</span> Usage as commandline utility</h3>
449 <div class="outline-text-3" id="text-5-1">
451 <div id="outline-container-org4c2e5f8" class="outline-4">
452 <h4 id="org4c2e5f8"><span class="section-number-4">5.1.1</span> Available commandline arguments</h4>
453 <div class="outline-text-4" id="text-5-1-1">
455 -j (existing files)…<br />
456     JAR file(s) to render.<br />
458 -c (existing directories)…<br />
459     Classpath directories<br />
462     Graph name. (default: "graph")<br />
465     Show debug info.<br />
467 -h, –help<br />
468     Show commandline usage help.<br />
471     Keep dot file.<br />
474     Hide orphaned classes.<br />
476 -w (one to many strings)…<br />
477     Whitelist glob(s).<br />
479 -b (one to many strings)…<br />
480     Blacklist glob(s).<br />
482 -r (one to many strings)…<br />
483     root class(es).<br />
485 -d (existing directory)<br />
486     Target directory. Default is current directory.<br />
488 -t (options: png, svg)<br />
489     Target image type. Default is: svg.<br />
493 <div id="outline-container-orgceb0cbf" class="outline-4">
494 <h4 id="orgceb0cbf"><span class="section-number-4">5.1.2</span> Specifying classes to render</h4>
495 <div class="outline-text-4" id="text-5-1-2">
497 Normal Java application has immense complexity. In addition to code
498 that was directly written by particular project developers, lots of
499 functionality is typically added as frameworks or libraries to the
500 project. In addition there is significant Java standard library.
504 Because JavaInspect uses reflection, it does not easily distinguish
505 between those. In normal situation you would rather want to visualize
506 only code that was developed specifically for your project and leave
507 frameworks like Spring etc. out. If you visualize all classes that are
508 possibly reachable from you project, you will easily get huge and
509 incomprehensible graph.
513 JavaInspect can digest compiled Java classes in 2 modes:
516 <li>Provide list of Jar files. Use <b>-j</b> option.</li>
517 <li>Provide list of filesystem directories that can be used as
518 classpath root. Use <b>-c</b> option.</li>
522 Currently JavaInspect uses following algorithm to add classes to
527 <li>All classes that were found in Jar files are added to graph by default.</li>
528 <li>None of the classes that were found in filesystem directories are
529 added to the graph by default (unless explicitly referenced). (TODO:
530 for consistency it would be better to add them too by default)</li>
531 <li>If whitelist is specified (<b>-w</b> option) everything that is not
532 matched by whitelist pattern(s) will be removed from the graph.</li>
533 <li>If blacklist is specified (<b>-b</b> option) everything that is matched
534 by blacklist pattern(s) will be removed from the graph.</li>
535 <li>Root classes can be specified using <b>-r</b> option. Root classes will
536 be added to the graph. JavaInspect will then try to recursively
537 discover all classes that were referenced by root class and add
538 those also to the graph.</li>
544 <div id="outline-container-org8037e80" class="outline-3">
545 <h3 id="org8037e80"><span class="section-number-3">5.2</span> Usage via Java API</h3>
546 <div class="outline-text-3" id="text-5-2">
548 Requires that classes to be visualised are available in the classpath.
552 To get JavaInspect into same classpath with your projecs I so far came
557 <li>Add JavaInspect library in your project as a dependency.</li>
559 <li>Create new Java project for the purpose visualizing your other
560 projects and include JavaInspect and your projecs binary artifacts
561 (Jar's) into new project classpath. Built binary Jar's (with no
562 source code) are sufficient because JavaInspect operates via
567 Simple Java based control/configuration code needs to be written for
568 each project. I usually put such code into directories devoted for
569 JUnit tests. Because it needs not to be compiled/embedded into final
570 product or project artifact I'm just willing to visualize.
574 Control code in general does the following:
577 <li>Create graph object.</li>
578 <li>Java reflection/classloaders does not provide mechanism for
579 discovering all classes under given package. Therefore you need to
580 declare at least some classes to be added to the graph by manually
581 adding individual classes to the graph. For every class added to
582 the graph, GraphViz will recursively inspect it and add all
583 referecned classes to the graph as well.</li>
584 <li>Graphs easilly get very big and complex so optionally we filter
585 important code using classname <a href="https://en.wikipedia.org/wiki/Glob_(programming)">glob</a> patterns based blacklist and/or
587 <li>Optionally we can tune some rendering parameters like:
589 <li>Possibility to remove orphaned classes (classes with no
590 references) from the graph.</li>
591 <li>Specify target directory for generated visualization
592 files. (Default is current directory)</li>
593 <li>Keep intermediate GraphViz dot file for later inspection.</li>
595 <li>Render graph.</li>
600 <div id="outline-container-org56db96c" class="outline-4">
601 <h4 id="org56db96c"><span class="section-number-4">5.2.1</span> Example 1: individually picked objects</h4>
602 <div class="outline-text-4" id="text-5-2-1">
604 This example demonstrates generating of class graph from hand picked
605 classes and visualizing GraphViz itself.
608 <div class="org-src-container">
609 <pre class="src src-java">
610 <span style="color: #8C8C8C;">// </span><span style="color: #8C8C8C;">Create graph</span>
611 <span style="color: #F92672;">final</span> <span style="color: #66D9EF;">ClassGraph</span> <span style="color: #FD971F;">graph</span> = <span style="color: #F92672;">new</span> <span style="color: #66D9EF;">ClassGraph</span>();
613 <span style="color: #8C8C8C;">// </span><span style="color: #8C8C8C;">Add some random object to the graph. GraphViz will detect Class from</span>
614 <span style="color: #8C8C8C;">// </span><span style="color: #8C8C8C;">the object.</span>
617 <span style="color: #8C8C8C;">// </span><span style="color: #8C8C8C;">Also add some random class to the graph.</span>
618 graph.add(Utils.<span style="color: #F92672;">class</span>);
620 <span style="color: #8C8C8C;">// </span><span style="color: #8C8C8C;">Keep intermediary GraphViz DOT file for reference.</span>
621 graph.setKeepDotFile(<span style="color: #FF80F4;">true</span>);
623 <span style="color: #8C8C8C;">// </span><span style="color: #8C8C8C;">Produce bitmap image titled "JavaInspect.png" to the user Desktop</span>
624 <span style="color: #8C8C8C;">// </span><span style="color: #8C8C8C;">directory</span>
625 graph.generateGraph(<span style="color: #EEDC82;">"JavaInspect"</span>);
631 Note: if desired, more compact version of the above:
633 <div class="org-src-container">
634 <pre class="src src-java"><span style="color: #F92672;">new</span> <span style="color: #66D9EF;">ClassGraph</span>().add(randomObject, RandomClass.<span style="color: #F92672;">class</span>)
635 .setKeepDotFile(<span style="color: #FF80F4;">true</span>).generateGraph(<span style="color: #EEDC82;">"JavaInspect"</span>);
644 <li>Generated DOT file: <a href="JavaInspect.dot">JavaInspect.dot</a></li>
645 <li>Generated PNG image: <a href="JavaInspect.png">JavaInspect.png</a></li>
650 <div id="outline-container-org419624a" class="outline-4">
651 <h4 id="org419624a"><span class="section-number-4">5.2.2</span> Example 2: GraphViz embedded in another project</h4>
652 <div class="outline-text-4" id="text-5-2-2">
654 <li>Download project Sixth <a href="https://www2.svjatoslav.eu/gitweb/?p=sixth.git;a=snapshot;h=HEAD;sf=tgz">code snapshot</a>.</li>
655 <li>Inspect and run <b>DataGraph.java</b>.</li>
660 <div id="outline-container-orgdf4f0b1" class="outline-4">
661 <h4 id="orgdf4f0b1"><span class="section-number-4">5.2.3</span> Embedding JavaInspect in your Maven project</h4>
662 <div class="outline-text-4" id="text-5-2-3">
664 Declare JavaInspect as dependency:
666 <div class="org-src-container">
667 <pre class="src src-xml"><<span style="color: #A6E22E;">dependencies</span>>
669 <<span style="color: #A6E22E;">dependency</span>>
670 <<span style="color: #A6E22E;">groupId</span>>eu.svjatoslav</<span style="color: #A6E22E;">groupId</span>>
671 <<span style="color: #A6E22E;">artifactId</span>>javainspect</<span style="color: #A6E22E;">artifactId</span>>
672 <<span style="color: #A6E22E;">version</span>>1.7</<span style="color: #A6E22E;">version</span>>
673 </<span style="color: #A6E22E;">dependency</span>>
675 </<span style="color: #A6E22E;">dependencies</span>>
681 Add Maven repository to retrieve artifact from:
683 <div class="org-src-container">
684 <pre class="src src-xml"><<span style="color: #A6E22E;">repositories</span>>
686 <<span style="color: #A6E22E;">repository</span>>
687 <<span style="color: #A6E22E;">id</span>>svjatoslav.eu</<span style="color: #A6E22E;">id</span>>
688 <<span style="color: #A6E22E;">name</span>>Svjatoslav repository</<span style="color: #A6E22E;">name</span>>
689 <<span style="color: #A6E22E;">url</span>>http://www2.svjatoslav.eu/maven/</<span style="color: #A6E22E;">url</span>>
690 </<span style="color: #A6E22E;">repository</span>>
692 </<span style="color: #A6E22E;">repositories</span>>
700 <div id="outline-container-org556c7e2" class="outline-2">
701 <h2 id="org556c7e2"><span class="section-number-2">6</span> TO DO</h2>
702 <div class="outline-text-2" id="text-6">
704 Note: Because this is side project (and I have many of them) I can
705 only contribute few hours per year at average. Any help is welcome. A
706 LOT of cool ideas could be implemented. For intstance:
710 <li>BUG: Should not hide references if there are too many of them to
711 classes if referring classes are not visible anyway because of
712 blacklist/whitelist rules. Basically reference counting should
713 exclude not visible classes.</li>
715 <li>BUG: Orphaned class removal does not work always. There are many
716 bugs and corner cases to find and fix still.</li>
718 <li>BUG: Code is not very readable. Document and refactor for better
719 maintainability.</li>
721 <li>FEATURE: Create installable DEB package.
723 <li>Submit it to some Debian developer for integration or become
724 Debian package maintainer.</li>
727 <li>FEATURE: Make it modular. That is: central part, an application
728 model could be standalone and serializable.
731 <li>There could be multiple ways to acquire model:
733 <li>By introspecting application via Java reflections (current mode
735 <li>By parsing java source. (unfinished)</li>
738 <li>There could be ways to manipulate model:
740 <li>Store/load/compare.</li>
741 <li>Trim uninteresting parts.</li>
742 <li>Highlight important parts.</li>
745 <li>There could be multiple ways to render model:
747 <li>PNG/SVG (currently implemented)</li>
748 <li>PlantUML (TODO)</li>
749 <li>Interactive 3D visualization (TODO)</li>
753 <li>FEATURE: Implement (or integrate existing java parser
754 <a href="https://javaparser.org/">https://javaparser.org/</a>) to be able to produce code visualizations
755 based on source code (in addition to current reflection based
758 <li>FEATURE: Integarte with <a href="http://plantuml.com/class-diagram">PlantUML</a>.</li>
760 <li>FEATURE: Add dark theme for generated graphs.</li>
762 <li>FEATURE: Sort Class fields by alphabet.</li>
764 <li>FEATURE: Visualize also concrete field values so it could be used as
765 ultra cool runtime logging/debugging framework.</li>
767 <li>FEATURE: Possibility to visualize structure and data from JVM
770 <li>FEATURE: Possibility to attach to remote process to visualize
771 data/structure using JVM debug port and mechanism.</li>
773 <li>FEATURE: Possibility to attach to JVM using JVM agent.</li>
775 <li>FEATURE: Possibility to inspect graphs in 3D using <a href="https://www3.svjatoslav.eu/projects/sixth-3d/">Sixth 3D engine</a>.</li>
777 <li>FEATURE: Possibility to select classes/fields/values to be
778 visualized in some graph query language. For greater flexibility in
779 comparison to currently supported glob syntax.</li>
781 <li>FEATURE: Add option to control JavaInspect via JSON or XML config
782 file. For example different graphs for given project could be
783 defined once in plain text config, possibly with the aid of some
784 interactive utility. Then defined graphs could be updated as part of
785 project build or release process.</li>
787 <li>FEATURE: Configurable maven plugin to generate graphs as part of the
788 project build/release process.</li>
792 <div id="outline-container-orgf7baf29" class="outline-2">
793 <h2 id="orgf7baf29"><span class="section-number-2">7</span> See also</h2>
794 <div class="outline-text-2" id="text-7">
796 Similar or alternative solutions:
799 <li><a href="http://www.class-visualizer.net/">http://www.class-visualizer.net/</a></li>
800 <li><a href="https://github.com/pahen/madge">Madge - similar tool for JavaScript</a></li>
805 <div id="postamble" class="status">
806 <p class="author">Author: Svjatoslav Agejenko</p>
807 <p class="date">Created: 2022-02-20 Sun 20:27</p>
808 <p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>