updated README with example links
authorAnthony Bargnesi <abargnesi@gmail.com>
Thu, 22 Sep 2016 17:38:42 +0000 (13:38 -0400)
committerAnthony Bargnesi <abargnesi@gmail.com>
Thu, 22 Sep 2016 17:38:42 +0000 (13:38 -0400)
README.md
myproject.dot [new file with mode: 0644]
myproject.svg [new file with mode: 0644]

index 6973374..c3b2bc5 100644 (file)
--- a/README.md
+++ b/README.md
@@ -31,12 +31,17 @@ Minor enhancements:
 
 ```bash
 java \
-  -cp .:/path/to/your/classes.jar:./target/javainspect-{VERSION}.jar \
+  -cp .:./example/target/myproject-0.0.jar:./target/javainspect-1.6-SNAPSHOT.jar \
   eu.svjatoslav.inspector.java.methods.Main \
-  /home/user/work/myproject/src/main/java/ com.myproject.* myproject
+  ./example/src/main/java/ com.myproject.* myproject
 ```
 
 Here we want to visualize _com.myproject.*_ classes found in
-*/home/user/work/myproject/src/main/java/*. The resulting *dot* and *svg*
+*./example/src/main/java/*. The resulting *dot* and *svg*
 file will be prefixed with *myproject*.
 
+### Output example
+
+![alt text](https://github.com/abargnesi/javainspect/raw/master/myproject.svg "MyProject Example")
+
+The [dot](https://github.com/abargnesi/javainspect/raw/master/myproject.dot) file is also saved.
diff --git a/myproject.dot b/myproject.dot
new file mode 100644 (file)
index 0000000..068b68c
--- /dev/null
@@ -0,0 +1,34 @@
+digraph Java {
+graph [rankdir=LR, overlap = false, concentrate=true];
+
+// Class: com.myproject.NumberTranslator
+    class_com_myproject_NumberTranslator[label=<<TABLE  BORDER="1" CELLBORDER="1" CELLSPACING="0">
+
+    // class descriptor header
+    <TR><TD colspan="2" PORT="f0"><FONT POINT-SIZE="8.0" >com.myproject</FONT><br/><FONT POINT-SIZE="25.0"><B>NumberTranslator</B></FONT></TD></TR>
+
+    // methods:
+        // translate
+        <TR><td ALIGN="right"><FONT POINT-SIZE="8.0">String</FONT></td><TD PORT="translate" ALIGN="left"><FONT COLOR ="red" POINT-SIZE="11.0">translate</FONT></TD></TR>
+    </TABLE>>, shape="none"];
+
+    // method references to other classes
+
+    // interfaces implemented by class: com.myproject.NumberTranslator
+    class_com_myproject_Behavior -> class_com_myproject_NumberTranslator[style="dotted", color="antiquewhite4", penwidth=10, dir="forward"];
+
+// Class: com.myproject.Behavior
+    class_com_myproject_Behavior[label=<<TABLE bgcolor="darkslategray1" BORDER="1" CELLBORDER="1" CELLSPACING="0">
+
+    // class descriptor header
+    <TR><TD colspan="2" PORT="f0"><FONT POINT-SIZE="8.0" >com.myproject</FONT><br/><FONT POINT-SIZE="25.0"><B>Behavior</B></FONT></TD></TR>
+
+    // methods:
+        // serialize
+        <TR><td ALIGN="right"><FONT POINT-SIZE="8.0">String</FONT></td><TD PORT="serialize" ALIGN="left"><FONT COLOR ="red" POINT-SIZE="11.0">serialize</FONT></TD></TR>
+        // translate
+        <TR><td ALIGN="right"><FONT POINT-SIZE="8.0">String</FONT></td><TD PORT="translate" ALIGN="left"><FONT COLOR ="red" POINT-SIZE="11.0">translate</FONT></TD></TR>
+    </TABLE>>, shape="none"];
+
+    // method references to other classes
+}
diff --git a/myproject.svg b/myproject.svg
new file mode 100644 (file)
index 0000000..afec2ba
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!-- Generated by graphviz version 2.38.0 (20140413.2041)
+ -->
+<!-- Title: Java Pages: 1 -->
+<svg width="473pt" height="93pt"
+ viewBox="0.00 0.00 473.00 93.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 89)">
+<title>Java</title>
+<polygon fill="white" stroke="none" points="-4,4 -4,-89 469,-89 469,4 -4,4"/>
+<!-- class_com_myproject_NumberTranslator -->
+<g id="node1" class="node"><title>class_com_myproject_NumberTranslator</title>
+<polygon fill="none" stroke="black" points="193.5,-31.5 193.5,-70.5 456.5,-70.5 456.5,-31.5 193.5,-31.5"/>
+<text text-anchor="start" x="294" y="-62.1" font-family="Times,serif" font-size="8.00">com.myproject</text>
+<text text-anchor="start" x="196.5" y="-40.5" font-family="Times,serif" font-weight="bold" font-size="25.00">NumberTranslator</text>
+<polygon fill="none" stroke="black" points="193.5,-13.5 193.5,-31.5 312.5,-31.5 312.5,-13.5 193.5,-13.5"/>
+<text text-anchor="start" x="282.5" y="-20.6" font-family="Times,serif" font-size="8.00">String</text>
+<polygon fill="none" stroke="black" points="312.5,-13.5 312.5,-31.5 456.5,-31.5 456.5,-13.5 312.5,-13.5"/>
+<text text-anchor="start" x="315.5" y="-19.7" font-family="Times,serif" font-size="11.00" fill="red">translate</text>
+<polygon fill="none" stroke="black" points="192,-13 192,-72 457,-72 457,-13 192,-13"/>
+</g>
+<!-- class_com_myproject_Behavior -->
+<g id="node2" class="node"><title>class_com_myproject_Behavior</title>
+<polygon fill="#97ffff" stroke="none" points="8,-4 8,-81 140,-81 140,-4 8,-4"/>
+<polygon fill="none" stroke="black" points="9,-40.5 9,-79.5 139,-79.5 139,-40.5 9,-40.5"/>
+<text text-anchor="start" x="43" y="-71.1" font-family="Times,serif" font-size="8.00">com.myproject</text>
+<text text-anchor="start" x="12" y="-49.5" font-family="Times,serif" font-weight="bold" font-size="25.00">Behavior</text>
+<polygon fill="none" stroke="black" points="9,-22.5 9,-40.5 61,-40.5 61,-22.5 9,-22.5"/>
+<text text-anchor="start" x="31" y="-29.6" font-family="Times,serif" font-size="8.00">String</text>
+<polygon fill="none" stroke="black" points="61,-22.5 61,-40.5 139,-40.5 139,-22.5 61,-22.5"/>
+<text text-anchor="start" x="64" y="-28.7" font-family="Times,serif" font-size="11.00" fill="red">serialize</text>
+<polygon fill="none" stroke="black" points="9,-4.5 9,-22.5 61,-22.5 61,-4.5 9,-4.5"/>
+<text text-anchor="start" x="31" y="-11.6" font-family="Times,serif" font-size="8.00">String</text>
+<polygon fill="none" stroke="black" points="61,-4.5 61,-22.5 139,-22.5 139,-4.5 61,-4.5"/>
+<text text-anchor="start" x="64" y="-10.7" font-family="Times,serif" font-size="11.00" fill="red">translate</text>
+<polygon fill="none" stroke="black" points="8,-4 8,-81 140,-81 140,-4 8,-4"/>
+</g>
+<!-- class_com_myproject_Behavior&#45;&gt;class_com_myproject_NumberTranslator -->
+<g id="edge1" class="edge"><title>class_com_myproject_Behavior&#45;&gt;class_com_myproject_NumberTranslator</title>
+<path fill="none" stroke="#8b8378" stroke-width="10" stroke-dasharray="1,5" d="M148.214,-42.5C156.343,-42.5 164.825,-42.5 173.482,-42.5"/>
+<polygon fill="#8b8378" stroke="#8b8378" stroke-width="10" points="173.713,-51.2501 183.713,-42.5 173.713,-33.7501 173.713,-51.2501"/>
+</g>
+</g>
+</svg>