Symboles des diagrammes UML
Tout le vocabulaire des formes sur une page : quel symbole appartient à quel diagramme parmi les quatorze, ce que signifie chaque pointe de flèche, et comment reconnaître un diagramme à ses symboles avant d'en lire un mot.
8 min de lectureUML 2.5.12 sur 35
01The shapes, and what each one commits you to
UML has fewer symbols than its reputation suggests. Strip away the ones that appear on a single diagram type and about a dozen shapes carry the whole language. Each one is a claim about what kind of thing is in the box, and picking the wrong one is a statement, not a cosmetic slip - an ellipse where a rounded rectangle belongs says “goal the user has” where you meant “step the system runs”.
| Element | Notation | What it means |
|---|---|---|
| Rectangle | ▭ | A classifier: a class, an artifact, a participant. The default shape, and the one every other structure diagram builds on. |
| Rectangle, underlined name | o1: Order | An instance rather than a type - one specific order, on an object diagram. The underline is the whole difference. |
| Rectangle with component icon | ▭ ⊟ | A replaceable unit with interfaces, on a component diagram. The icon sits top-right and is the only thing distinguishing it from a class. |
| 3D box | ▱ | A node - hardware, a container, an execution environment - on a deployment diagram. |
| Tabbed folder | 🗀 | A namespace, on a package diagram. |
| Ellipse | ⬭ | A use case: something an actor wants to achieve, on a use case diagram. Never a step, never a screen. |
| Stick figure | ☺ | An actor: a role outside the system boundary. It can be a person, another system or a clock, which is why the figure is a role and not a portrait. |
| Rounded rectangle | ▢ | An action on an activity diagram, or a state on a state machine. The same shape, two meanings - the surrounding notation disambiguates. |
| Rhombus | ◇ | A decision, when one branch is taken, or a merge, when several come back together. Same glyph both ways; the arrow count tells you which. |
| Solid bar | ▬ | A fork, when everything downstream runs concurrently, or a join, when everything upstream must finish first. |
| Filled disc | ● | The initial node or initial pseudostate: where the flow starts. |
| Ringed disc | ◉ | Activity final or final state: the whole flow is over. |
| Crossed circle | ⊗ | Flow final. It ends this token, not the activity - the distinction that trips up most first drafts. |
| Folded corner | 🗒 | A note or a constraint, attached by a dashed line. Curly braces inside it make it a constraint that has to hold. |
The node shapes, and the diagrams that own them.
02The six lines every diagram shares
The relationship lines are the part of UML worth learning once, because they are drawn identically wherever they appear. A hollow triangle means the same thing between two classes, two components, two use cases and two nodes, so the investment amortises across all fourteen diagram types.
| Element | Notation | What it means |
|---|---|---|
| Association | A plain line. The two ends know about each other, and multiplicities at either end say how many. | |
| Generalization | Solid line, hollow triangle at the general end. “Is a kind of” - inheritance, specialization, subtype. | |
| Realization | Dashed line, hollow triangle. The source implements the contract the target declares. Interfaces, not inheritance. | |
| Composition | Filled diamond at the whole. The part belongs to one whole and dies with it. | |
| Aggregation | Hollow diamond at the whole. A whole/part reading with no ownership claim, and no formal semantics in UML 2.5.1. | |
| Dependency | Dashed, open arrow. The source uses the target - a parameter, a return type, a static call - without holding it. |
Two rules make these recoverable from memory rather than from a table. First, the decorated end is the end that matters: the triangle points at the more general thing, the diamond sits on the owning whole, the open arrow points at what is being used. Second, a dash weakens the solid claim: solid triangle is inheritance and dashed triangle is only a contract; a solid line is a structural link and a dashed one is mere usage.
03The lines, drawn against each other
Arrowheads are hard to tell apart in prose and easy to tell apart side by side. Below, the four most-confused lines are drawn between the same kind of boxes at the same scale, so the difference is the head and nothing else.
Left to right: Customer and Order are simply associated, one to many. CardPayment generalizes Payment - the hollow triangle points up at the more general classifier. Invoice realizes the Printable interface, and the dash is the entire difference between that and the line beside it. Basket depends on PriceService, using it without owning it.
04Symbols that only appear on one diagram
A handful of marks belong to exactly one diagram type. They are worth recognising precisely because they identify the diagram: seeing one tells you what you are reading.
| Element | Notation | What it means |
|---|---|---|
| Lifeline | ▭ + ┆ | A box with a dashed vertical line under it - sequence diagrams only. The thin rectangle on the line is an execution occurrence. |
| Combined fragment | alt / loop / opt | A box with a pentagon name tag in its corner, wrapping part of a sequence diagram to make it conditional or repeated. |
| Include / extend | «include» | A dashed open arrow with a keyword, on a use case diagram. The keyword is load-bearing: the two point in opposite directions. |
| Subject boundary | ▭ around | The rectangle drawn behind the use cases. Inside is the system; the actors stay outside it. |
| Deploy | «deploy» | A dashed arrow putting an artifact onto a node. Never the reverse. |
| Ball and socket | —○ ⊃— | A provided interface (lollipop) meeting a required one (socket), on a component diagram. The pair is a connector. |
| Swimlane | │ │ │ | A partition on an activity diagram. Which lane an action sits in says who is responsible for it. |
| Crow's foot | —‹ | Not UML at all. A three-pronged end means “many” in ER notation - if you see one, you are reading a data model, not a class diagram. |
05Decorations: guillemets, braces, brackets
Three kinds of punctuation appear on UML diagrams and each one means something specific. They are easy to skim past, and each carries more information per character than the shape it sits on.
| Element | Notation | What it means |
|---|---|---|
| Guillemets | «interface» | A stereotype: an extension of the standard vocabulary, defined by UML itself or by a profile. Written <<…>> where the character is unavailable. |
| Curly braces | { ordered } | A constraint that must hold - on an end, an attribute or in a note. Common ones are { ordered }, { unique } and { readOnly }. |
| Square brackets | [approved] | A guard on a transition or a flow. The edge is only taken when the condition holds, and the guards leaving one decision should be exhaustive. |
| Visibility markers | + - # ~ | Public, private, protected and package, before a member name. |
| Multiplicity | 0..* 1 2..5 | How many instances participate, written at the end of the line it applies to. A missing multiplicity means unspecified, not one. |
| Underline | static | Belongs to the classifier rather than an instance - or, on a whole box, that the box is an instance. |
06What to remember
In one line each
- 01Shapes identify the diagram; lines carry the meaning. Read them in that order.
- 02The decorated end of a line is the end that matters: triangle at the general, diamond at the whole, arrow at the used.
- 03A dash always weakens the solid claim - realization not inheritance, usage not structure, reply not call.
- 04The same rounded rectangle is an action on an activity diagram and a state on a state machine.
- 05Guillemets, braces and brackets are notation, not annotation. Dropping them changes what the diagram says.
07Questions fréquentes
Quels sont les symboles de base des diagrammes UML ?
Un rectangle est un classificateur - classe, composant ou artefact. Une ellipse est un cas d'utilisation, un bonhomme bâton un acteur, un rectangle arrondi une action ou un état, et un losange une décision. Un disque plein démarre un flux, un disque cerclé le termine. Le sens est porté par les lignes : la pointe indique la relation.
Comment savoir quel diagramme UML j'ai sous les yeux ?
Lisez les formes avant les lignes. Bonshommes bâtons et ellipses signifient diagramme de cas d'utilisation, boîtes arrondies avec disque de départ plein signifient activité ou machine à états, lignes de vie verticales avec flèches horizontales signifient séquence, et rectangles simples avec losanges et triangles signifient classes. Les boîtes 3D signifient déploiement.
Que signifie une ligne pointillée en UML ?
Le pointillé affaiblit toujours ce qu'affirme la version pleine. Pointillé avec flèche ouverte : une dépendance, un usage sans possession. Pointillé avec triangle creux : une réalisation, pas un héritage. Pointillé vers une boîte à coin plié : une note. Et dans un diagramme de séquence, c'est une réponse et non un appel.
Les symboles UML sont-ils identiques dans les quatorze types de diagrammes ?
Les lignes oui, les boîtes non. Généralisation, association, dépendance et réalisation se dessinent partout de la même façon, ce qui rend leur apprentissage rentable. Les formes de nœuds sont propres à chaque diagramme, et c'est voulu : c'est ce qui permet de reconnaître un diagramme d'un coup d'œil.
Que signifie un rectangle à coin plié en UML ?
C'est une note : un commentaire, une contrainte ou une explication, rattachée par une ligne pointillée à ce qu'elle décrit. Le texte entre accolades est une contrainte qui doit tenir, par exemple { total > 0 }. Les notes n'ont aucune sémantique propre et s'attachent à n'importe quoi.
À lire aussi