X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Ftest%2Fjava%2Feu%2Fsvjatoslav%2Finspector%2Fjava%2Fstructure%2Fexample%2FRenderJavaInspect.java;h=1f388837c1044d4edde2308a09b340891fdd9a3f;hb=c680c10ad9057106e23b149246abdd84b41775ee;hp=132276aa865f37c0e02ed73d86aeebbb788619ad;hpb=7520d141e59025fdd93e43f6e86785b451975ecf;p=javainspect.git diff --git a/src/test/java/eu/svjatoslav/inspector/java/structure/example/RenderJavaInspect.java b/src/test/java/eu/svjatoslav/inspector/java/structure/example/RenderJavaInspect.java index 132276a..1f38883 100755 --- a/src/test/java/eu/svjatoslav/inspector/java/structure/example/RenderJavaInspect.java +++ b/src/test/java/eu/svjatoslav/inspector/java/structure/example/RenderJavaInspect.java @@ -9,61 +9,61 @@ 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; +import java.io.FileNotFoundException; + public class RenderJavaInspect { - private static void fullProjectExample() { - // Create graph - final ClassGraph graph = new ClassGraph(); + private static void fullProjectExample() { + // Create graph + 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("."); + // 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.blacklistClassPattern("eu.svjatoslav.inspector.java.structure.example.*"); + // Blacklist example classes from being shown on the graph + graph.blacklistClassPattern("eu.svjatoslav.inspector.java.structure.example.*"); - // do not show single classes with no relationships on the graph - graph.hideOrphanedClasses(); + // 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"); - } + // 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 + private static void handpickClassesExample() { + /* + * This example demonstrates generating of class graph from hand picked * classes and visualizing GraphViz itself. */ - // Create graph - final ClassGraph graph = new ClassGraph(); + // Create graph + final ClassGraph graph = new ClassGraph(); - // Add some random object to the graph. GraphViz will detect Class from - // the object. - graph.add(graph); + // Add some random object to the graph. GraphViz will detect Class from + // the object. + graph.add(graph); - // Also add some random class to the graph. - graph.add(Utils.class); + // Also add some random class to the graph. + graph.add(Utils.class); - // Keep intermediary GraphViz DOT file for reference. - graph.setKeepDotFile(true); + // Keep intermediary GraphViz DOT file for reference. + graph.setKeepDotFile(true); - // Produce bitmap image titled "JavaInspect.png" to the user Desktop - // directory - graph.generateGraph("JavaInspect"); - } + // Produce bitmap image titled "JavaInspect.png" to the user Desktop + // directory + graph.generateGraph("JavaInspect"); + } - public static void main(final String[] args) throws FileNotFoundException { + public static void main(final String[] args) throws FileNotFoundException { - handpickClassesExample(); + handpickClassesExample(); - fullProjectExample(); + fullProjectExample(); - } + } }