X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Finspector%2Fjava%2Fstructure%2Fexample%2FRenderJavaInspect.java;fp=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Finspector%2Fjava%2Fstructure%2Fexample%2FRenderJavaInspect.java;h=0000000000000000000000000000000000000000;hb=92162fc60b34f64b1f2570e943ab2cef6db8e54d;hp=560c1726dd1a0c7bdc2c9afc584146e34eb07c93;hpb=d140a5c445361927abe4fe3a90e6ce95cd6530c3;p=javainspect.git 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 deleted file mode 100644 index 560c172..0000000 --- a/src/main/java/eu/svjatoslav/inspector/java/structure/example/RenderJavaInspect.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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 { - - handpickClassesExample(); - - fullProjectExample(); - - } - - private static void fullProjectExample() { - final ClassGraph graph = new ClassGraph(); - - // Recursively scan current directory for Java source code and attempt - // to detect class names from there to be added to the graph. - graph.addProject("."); - - // Blacklist example classes from being shown on the graph - graph.getFilter().blacklistClassPattern( - "eu.svjatoslav.inspector.java.structure.example.*"); - - // do not show single classes with no relationships on the graph - graph.hideOrphanedClasses(); - - // Produce bitmap image titled "JavaInspect full project.png" to the - // user Desktop directory. - graph.generateGraph("JavaInspect full project"); - } - - private static void handpickClassesExample() { - /* - * This example demonstrates generating of class graph from hand picked - * classes. - */ - - // Create graph - final ClassGraph graph = new ClassGraph(); - - // While classes and objects can be immediately passed to ClassGraph - // constructor as arguments, it is also possible to add then one by one - // as in the following example. - - // 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 and keep intermediary GraphViz DOT file for reference. - graph.generateGraph("JavaInspect", true); - } -}