mirror of https://github.com/dspinellis/UMLGraph
Updated inferece test, added reference dot file
This commit is contained in:
parent
d6c2a57086
commit
6cccd702ed
|
|
@ -0,0 +1,49 @@
|
|||
#!/usr/local/bin/dot
|
||||
#
|
||||
# Class diagram
|
||||
# Generated by UmlGraph version 4.1 (http://www.spinellis.gr/sw/umlgraph)
|
||||
#
|
||||
|
||||
digraph G {
|
||||
edge [fontname="Helvetica",fontsize=10,labelfontname="Helvetica",labelfontsize=10];
|
||||
node [fontname="Helvetica",fontsize=10,shape=record];
|
||||
// A
|
||||
c65 [label="{A\n|first : B\lsecond : B\lthird : C\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
|
||||
// B
|
||||
c66 [label="{B\n||doSomething(b : B, c : C) : A\l}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
|
||||
// C
|
||||
c67 [label="{C\n|collectionOfA : List\<A\>\lcollectionOfB : ArrayList\<B\>\lmapOfD : Map\<String, D\>\lchilds : C[]\lanOpaqueList : List\<\>\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
|
||||
// MyFunnyList<T, V>
|
||||
c68 [label="{MyFunnyList\<T, V\>\n|myField : V\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
|
||||
// MyList
|
||||
c69 [label="MyList", fontname="Helvetica", fontcolor="black", fontsize=10.0];
|
||||
// D
|
||||
c70 [label="{D\n|anotherListOfA : MyList\l|}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
|
||||
//MyFunnyList<T, V> extends java.util.ArrayList<T>
|
||||
c71 -> c68 [dir=back,arrowtail=empty];
|
||||
//MyList extends MyFunnyList<A, B>
|
||||
c68 -> c69 [dir=back,arrowtail=empty];
|
||||
// A depend B
|
||||
c65 -> c66 [taillabel="", label="", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed];
|
||||
// A depend C
|
||||
c65 -> c67 [taillabel="", label="", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed];
|
||||
// B depend A
|
||||
c66 -> c65 [taillabel="", label="", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed];
|
||||
// B depend C
|
||||
c66 -> c67 [taillabel="", label="", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed];
|
||||
// C depend java.util.Map<K, V>
|
||||
c67 -> c72 [taillabel="", label="", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed];
|
||||
// C depend java.util.ArrayList<E>
|
||||
c67 -> c71 [taillabel="", label="", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed];
|
||||
// C depend java.util.List<E>
|
||||
c67 -> c73 [taillabel="", label="", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed];
|
||||
// D depend MyList
|
||||
c70 -> c69 [taillabel="", label="", headlabel="", fontname="Helvetica", fontcolor="black", fontsize=10.0, color="black", arrowhead=open, style=dashed];
|
||||
// java.util.Map<K, V>
|
||||
c72 [label="{«interface» \nMap\<K, V\>\n||size() : int\lisEmpty() : boolean\lcontainsKey(arg0 : Object) : boolean\lcontainsValue(arg0 : Object) : boolean\lget(arg0 : Object) : V\lput(arg0 : K, arg1 : V) : V\lremove(arg0 : Object) : V\lputAll(arg0 : Map\<?, ?\>)\lclear()\lkeySet() : Set\<K\>\lvalues() : Collection\<V\>\lentrySet() : Set\<Map.Entry\<K, V\>\>\lequals(arg0 : Object) : boolean\lhashCode() : int\l}", fontname="Helvetica-Oblique", fontcolor="black", fontsize=10.0];
|
||||
// java.util.ArrayList<E>
|
||||
c71 [label="{ArrayList\<E\>\n|serialVersionUID : long\lelementData : E[]\lsize : int\l|trimToSize()\lensureCapacity(arg0 : int)\lsize() : int\lisEmpty() : boolean\lcontains(arg0 : Object) : boolean\lindexOf(arg0 : Object) : int\llastIndexOf(arg0 : Object) : int\lclone() : Object\ltoArray() : Object[]\ltoArray(arg0 : T[]) : T[]\lget(arg0 : int) : E\lset(arg0 : int, arg1 : E) : E\ladd(arg0 : E) : boolean\ladd(arg0 : int, arg1 : E)\lremove(arg0 : int) : E\lremove(arg0 : Object) : boolean\lfastRemove(arg0 : int)\lclear()\laddAll(arg0 : Collection\<?\>) : boolean\laddAll(arg0 : int, arg1 : Collection\<?\>) : boolean\lremoveRange(arg0 : int, arg1 : int)\lRangeCheck(arg0 : int)\lwriteObject(arg0 : ObjectOutputStream)\lreadObject(arg0 : ObjectInputStream)\l}", fontname="Helvetica", fontcolor="black", fontsize=10.0];
|
||||
// java.util.List<E>
|
||||
c73 [label="{«interface» \nList\<E\>\n||size() : int\lisEmpty() : boolean\lcontains(arg0 : Object) : boolean\literator() : Iterator\<E\>\ltoArray() : Object[]\ltoArray(arg0 : T[]) : T[]\ladd(arg0 : E) : boolean\lremove(arg0 : Object) : boolean\lcontainsAll(arg0 : Collection\<?\>) : boolean\laddAll(arg0 : Collection\<?\>) : boolean\laddAll(arg0 : int, arg1 : Collection\<?\>) : boolean\lremoveAll(arg0 : Collection\<?\>) : boolean\lretainAll(arg0 : Collection\<?\>) : boolean\lclear()\lequals(arg0 : Object) : boolean\lhashCode() : int\lget(arg0 : int) : E\lset(arg0 : int, arg1 : E) : E\ladd(arg0 : int, arg1 : E)\lremove(arg0 : int) : E\lindexOf(arg0 : Object) : int\llastIndexOf(arg0 : Object) : int\llistIterator() : ListIterator\<E\>\llistIterator(arg0 : int) : ListIterator\<E\>\lsubList(arg0 : int, arg1 : int) : List\<E\>\l}", fontname="Helvetica-Oblique", fontcolor="black", fontsize=10.0];
|
||||
}
|
||||
|
||||
|
|
@ -10,10 +10,14 @@ import java.util.Map;
|
|||
* @opt attributes
|
||||
* @opt operations
|
||||
* @opt types
|
||||
* @opt collpackages java.util.*
|
||||
* @hidden
|
||||
*/
|
||||
class UMLOptions {}
|
||||
|
||||
/**
|
||||
* @opt inferassoctype has
|
||||
*/
|
||||
class A {
|
||||
B first;
|
||||
B second;
|
||||
|
|
@ -27,7 +31,7 @@ class B {
|
|||
class C {
|
||||
List<A> collectionOfA;
|
||||
ArrayList<B> collectionOfB;
|
||||
Map<String, B> mapOfB;
|
||||
Map<String, D> mapOfD;
|
||||
C[] childs;
|
||||
List anOpaqueList;
|
||||
}
|
||||
|
|
@ -38,6 +42,9 @@ class MyFunnyList<T, V> extends ArrayList<T> {
|
|||
|
||||
class MyList extends MyFunnyList<A, B> {}
|
||||
|
||||
/**
|
||||
* @opt inferassoctype composed
|
||||
*/
|
||||
class D {
|
||||
MyList anotherListOfA;
|
||||
}
|
||||
Loading…
Reference in New Issue