POC for making graph of a java callstack.
Java Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This is a proof of concept for making a graphviz -file based on flow of java code.

The main idea is to build a (graphviz) DOT -file. Aspects (Around aspects) "dives" into the code-flow and builds a graph-file according to the pointcuts. It 
also serializes parameter and result values as xml-files and has references to the files on the arrows.

Also has a Servlet which lists the graphviz -files (found in java.io.tempdir). Converts to svg and outputs if a graphviz -file is clicked.

See sample graphviz file in doc/sample (may be out-dated, as I may forget to keep this doc updated)

## Use the tests in src/test/java and src/test/resources for sample ##
The java code mimics a semi-complex multi-layered -structure, which has the following top-down layers:
- Action (imagine this to be the entry point for some GUI)
- Adapter (imagine this to be where we translate DTO)
- Facade (Inside of some service we've created)
- Service and Repository. (Stuff we're doing inside the facade)

Only the Graphviz -domain model has unit tests. The Aspect, (threadlocal) Context and Servlet doesn't have 
unit tests.

environment variable MAKE_GRAPHS must be TRUE, or nor the graph file or parameter/result -xml files will be written.

- Set environment variable MAKE_GRAPHS to TRUE
- Run ActionIntegrationTest (which will save a graph or two to /tmp/)
- rin #mvn jetty:run
- browse to http://localhost:8080/vizpoc/graph
- the rest you'll understand from the web -page.

Sample on github: