UML Arrows Explained - Know UML Relationship Types
UML Class Diagram Arrows and Relationships
UML relationships uses various arrows that represent their meaning and allow us to differentiate between various kinds of relationships. UML class diagram uses connectors with arrows for associations, dependencies, and realizations. The other types of relationships (e.g. composition, generalization) can use diamonds and triangles (triangle arrows) as connector caps.
UML Arrows Meaning
Class diagrams use these UML arrows and connectors:
- A solid line without any decoration represents an association.
- Triangle connectors:
- A triangle-head arrow with a solid line represents a generalization.
- A triangle-head arrow with a dashed line represents a realization.
- Arrow connectors:
- An arrow with a dashed line is used for dependencies. Except for a general dependency it may be further specialized as
- An arrow with a solid line represents a directional association.
- A double-arrowed line is used for bidirectional association.
- Diamond connectors:
- A filled diamond (or black diamond) with a solid line represents an composition.
- An empty diamond (or white diamond) with a solid line represents a aggreation.
- A circle with a plus sign represents a containment.