refactored packages
[javainspect.git] / src / main / java / eu / svjatoslav / inspector / java / structure / example / RenderJavaInspect.java
diff --git a/src/main/java/eu/svjatoslav/inspector/java/structure/example/RenderJavaInspect.java b/src/main/java/eu/svjatoslav/inspector/java/structure/example/RenderJavaInspect.java
new file mode 100644 (file)
index 0000000..f993e22
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * JavaInspect - Utility to visualize java software
+ * Copyright (C) 2013, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * 
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public License
+ * as published by the Free Software Foundation.
+ */
+
+package eu.svjatoslav.inspector.java.structure.example;
+
+import java.io.FileNotFoundException;
+
+import eu.svjatoslav.inspector.java.structure.ClassGraph;
+import eu.svjatoslav.inspector.java.structure.Utils;
+
+public class RenderJavaInspect {
+
+       public static void main(final String[] args) throws FileNotFoundException {
+
+               // Create graph
+               final ClassGraph graph = new ClassGraph();
+
+               // Add some object to the graph.
+               graph.addObject(graph);
+
+               // Add some class to the graph.
+               graph.addClass(Utils.class);
+
+               // Produce bitmap image titled "JavaInspect.png" to the user Desktop
+               // directory.
+               graph.generateGraph("JavaInspect", true);
+       }
+}