GraphViz Integration
Sometimes understanding the component graph within your application is difficult so Sting can generate a .dot report to visualize the component graph. The report can be passed into GraphViz or any other tool that supports the .dot graph description language.
To generate the report it is necessary to set the annotation processor option sting.emit_dot_reports
to
the value true
which is typically done by passing the command line option -Asting.emit_dot_reports=true
to the javac compiler. This will generate a file with the same name as the injector and the filename
extension .gv
. So the class com.biz.MyInjector
will produce a report named com/biz/MyInjector.gv
.
This report can be converted into images using any number of different tools but we often use a tool such
as neato
to generate svg images using a command such as:
> neato -Tsvg -o com/biz/MyInjector.svg com/biz/MyInjector.gv
An example of the type of images produced from a .dot report.
The nodes are colored blue if they are eager while the injector is colored green. The connections between the nodes have the symbology as follows: