New! Render PlantUML diagrams directly inside GitHub
with our official browser extension —
No server. No tokens. No tracking. Zero permissions but clipboard. —
Try it out and let us know what you think!
Object Diagram
Definition of objects
You define instances of objects using the object
keyword.
Relations between objects
Relations between objects are defined using the following symbols :
| Type | Symbol | Purpose |
| Extension |
<|--
|
Specialization of a class in a hierarchy |
| Implementation |
<|..
|
Realization of an interface by a class |
| Composition |
*--
|
The part cannot exist without the whole |
| Aggregation |
o--
|
The part can exist independently of the whole |
| Dependency |
-->
|
The object uses another object |
| Dependency |
..>
|
A weaker form of dependency |
-- by .. to have a dotted line.
Knowing those rules, it is possible to draw the following drawings.
It is possible a add a label on the relation, using : followed by the text of the label.
For cardinality, you can use double-quotes "" on
each side of the relation.
Associations objects
Adding fields
To declare fields, you can use the symbol : followed by
the field's name.
{}.
Common features with class diagrams
Map table or associative array
You can define a map table or associative array, with map keyword and => separator.
Program (or project) evaluation and review technique (PERT) with map
You can use map table in order to make Program (or project) evaluation and review technique (PERT) diagram.
Display JSON Data on Class or Object diagram
Simple example