Code refactoring. Simplified API.
[javainspect.git] / src / test / java / eu / svjatoslav / inspector / java / structure / example / RenderJavaInspect.java
old mode 100644 (file)
new mode 100755 (executable)
index 560c172..7d9eb80
@@ -1,10 +1,10 @@
 /*
  * JavaInspect - Utility to visualize java software
- * Copyright (C) 2013, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- * 
+ * Copyright (C) 2013-2015, 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.
+ * modify it under the terms of version 3 of the GNU Lesser General Public License
+ * or later as published by the Free Software Foundation.
  */
 
 package eu.svjatoslav.inspector.java.structure.example;
@@ -16,14 +16,6 @@ import eu.svjatoslav.inspector.java.structure.Utils;
 
 public class RenderJavaInspect {
 
-       public static void main(final String[] args) throws FileNotFoundException {
-
-               handpickClassesExample();
-
-               fullProjectExample();
-
-       }
-
        private static void fullProjectExample() {
                final ClassGraph graph = new ClassGraph();
 
@@ -57,13 +49,21 @@ public class RenderJavaInspect {
                // as in the following example.
 
                // Add some object to the graph.
-               graph.addObject(graph);
+               graph.add(graph);
 
                // Add some class to the graph.
-               graph.addClass(Utils.class);
+               graph.add(Utils.class);
 
                // Produce bitmap image titled "JavaInspect.png" to the user Desktop
                // directory and keep intermediary GraphViz DOT file for reference.
                graph.generateGraph("JavaInspect", true);
        }
+
+       public static void main(final String[] args) throws FileNotFoundException {
+
+               handpickClassesExample();
+
+               fullProjectExample();
+
+       }
 }