+* Example graphs
++ A very simple example:
+
+ file:example.png
+
+ Graph legend:
+
+ file:legend.png
+
+
++ [[https://www3.svjatoslav.eu/projects/sixth-3d/graphs/][See example produced graphs]] for [[https://www3.svjatoslav.eu/projects/sixth-3d/][Sixth 3D - 3D engine project]].
+
+* Usage
+ :PROPERTIES:
+ :ID: 2ad2889e-6c95-4662-b3f4-2c341fc74522
+ :END:
+JavaInspect can be controlled in 2 different ways:
++ [[id:acf1896a-74b4-4914-acf6-a77075e07f25][as standalone commandline utility]]
++ [[id:bbeeffc8-3767-440d-8d93-ec9124dd60ee][as embedded Java library via Java API]]
+
+** usage as commandline utility
+ :PROPERTIES:
+ :ID: acf1896a-74b4-4914-acf6-a77075e07f25
+ :END:
+To enable commandline support, (study and) execute script:
+: commandline launcher/install
+
+Warning: It was tested only on Debian Stretch linux.
+
+Available commandline arguments:
+#+BEGIN_VERSE
+-j (existing files)...
+ JAR file(s) to render.
+
+-n (mandatory, string)
+ Graph name.
+
+--debug
+ Show debug info.
+
+-k
+ Keep dot file.
+
+-h
+ Hide orphaned classes.
+
+-w (one to many strings)...
+ Whitelist glob(s).
+
+-b (one to many strings)...
+ Blacklist glob(s).
+
+-d (existingdirectory)
+ Target directory. Default is current directory.
+
+-t (options: png, svg)
+ Target image type. Default is: svg.
+#+END_VERSE
+** usage via Java API
+ :PROPERTIES:
+ :ID: bbeeffc8-3767-440d-8d93-ec9124dd60ee
+ :END:
+Requires that classes to be visualised are available in the classpath.
+
+To get JavaInspect into same classpath with your projecs I so far came
+up with 2 solutions:
+
+1. Add JavaInspect library in your project as a dependency.
+
+2. Create new Java project for the purpose visualizing your other
+ projects and include JavaInspect and your projecs binary artifacts
+ (Jar's) into new project classpath. Built binary Jar's (with no
+ source code) are sufficient because JavaInspect operates via
+ reflection.
+
+Simple Java based control/configuration code needs to be written for
+each project. I usually put such code into directories devoted for
+JUnit tests. Because it needs not to be compiled/embedded into final
+product or project artifact I'm just willing to visualize.
+
+Control code in general does the following:
+1. Create graph object.
+2. Java reflection/classloaders does not provide mechanism for
+ discovering all classes under given package. Therefore you need to
+ declare at least some classes to be added to the graph by manually
+ adding individual classes to the graph. For every class added to
+ the graph, GraphViz will recursively inspect it and add all
+ referecned classes to the graph as well.
+3. Graphs easilly get very big and complex so optionally we filter
+ important code using classname [[https://en.wikipedia.org/wiki/Glob_(programming)][glob]] patterns based blacklist and/or
+ whitelist.
+4. Optionally we can tune some rendering parameters like:
+ + Possibility to remove orphaned classes (classes with no
+ references) from the graph.
+ + Specify target directory for generated visualization
+ files. (Default is current directory)
+ + Keep intermediate GraphViz dot file for later inspection.
+5. Render graph.
+
+
+*** example 1: individually picked objects