跳到主要内容

Object Diagram(对象图)· ✅ Full

分类: Structure Diagrams(静态结构)| OMG UML 2.x ID: Instances

对象图 = 类图的运行时快照。每个节点代表一个对象实例,每条边代表对象间的 link(连接)。

拓扑 = 节点 + 边,正是 Sugiyama 引擎擅长的——完全支持。

Structure · ✅ Full

Object Diagram

Shopping Cart runtime snapshot — nodes are instances (alice : Customer), edges are links.

{ "preset": "classic", "theme": "light", "direction": "LR", "nodes": [ { "id": "alice", "label": "alice : Customer", "kind": "frontend" }, { "id": "cart", "label": "cart : ShoppingCart", "kind": "backend" }, { "id": "item1", "label": "item1 : Product", "kind": "external" }, { "id": "item2", "label": "item2 : Product", "kind": "external" }, { "id": "order", "label": "order : Order", "kind": "backend" }, { "id": "pay", "label": "payment : Payment", "kind": "messagebus" } ], "edges": [ { "from": "alice", "to": "cart", "label": "owns" }, { "from": "cart", "to": "item1", "label": "contains" }, { "from": "cart", "to": "item2", "label": "contains" }, { "from": "cart", "to": "order", "label": "creates" }, { "from": "order", "to": "pay", "label": "pays with" } ] }