2 * JavaInspect - Utility to visualize java software
3 * Copyright (C) 2013-2020, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 3 of the GNU Lesser General Public License
7 * or later as published by the Free Software Foundation.
10 package eu.svjatoslav.inspector.java;
12 import eu.svjatoslav.inspector.java.structure.ClassGraph;
13 import eu.svjatoslav.inspector.java.structure.Utils;
15 public class RenderJavaInspect {
18 * Running this method via IDE will produce 2 files in project root directory:
19 * JavaInspect.svg (JavaInspect utility visualizes itself) and
20 * JavaInspect.dot (GraphViz dot file, for reference).
22 private static void handpickClassesExample() {
24 * This example demonstrates generating of class graph from hand picked
25 * classes and visualizing GraphViz itself.
29 final ClassGraph graph = new ClassGraph();
31 // Add some random object to the graph. GraphViz will detect Class from
35 // Also add some random class to the graph.
36 graph.add(Utils.class);
38 // Keep intermediary GraphViz DOT file for reference.
39 graph.setKeepDotFile(true);
41 // Produce SVG image titled "JavaInspect.svg" to the user Desktop
43 graph.generateGraph("JavaInspect");
46 public static void main(final String[] args) {
48 handpickClassesExample();