Graffiti is a core java based tool used to analyse jar files. It generates minimal bootstrap based html files with all the required statistics of the jar file. It is NOT a UML diagram generation tool.
# Introduction
Graffiti is a java library for generating relationships between the classes in a jar file. Graffiti helps you bring the relationships to life using visual representations. It generates bootstrap based html files containing the visual representation of the relationships among the classes. It also generates many other useful statistics about the jar like :
- Information about maven dependencies
- Number of classes; interfaces; abstract classes
- Required java version
- Attributes and Method level details
# Using Graffiti
There are two versions of graffiti available. The allows you to upload your jar file and without any hassle it generates the output which will be available for download as a zip package. All you need to do is to browse to the index.htmlof the extracted package and open it in a browser.
The other option is to download the graffiti package. This requires the following pre-requisites to be available on your machine :
After the download please follow the following instructions to build and run graffiti on your machine :
$ cd /path/to/downloaded/graffiti
$ java -jar graffiti-core-0.0.1.jar /path/to/jar/to/analyse /path/to/output/dir /path/to/dot/executable
# Output
The output for both the web based version and stand-alone version is a collection of bootstrap based html files that contains the required information about the jar file. In case of the web based version, the same is packaged as a zip file and is available instantaneously for download. The basic structure of the output directory is as follows :
. ├── index.html and other html files ├── css ├── dot ├── images └── js
# Demo
A demo of commons-lang3-3.5.jar can be downloaded here. It will download a zip file containing a pre-compiled graffiti output of the commons-lang3-3.5.jar analysis. Some of the statistics are :
# | Property | Value |
---|---|---|
1 | Classes | 222 |
2 | Interface | 17 |
3 | Abstract Classes | 21 |
4 | Maven Group | org.apache.commons |
5 | Dependencies | 4 |