Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Elements of package diagrams

One page per symbol of a package diagram: what it looks like, its syntax and the UML 2.5.1 clause it follows. Use these pages to look something up; to write a whole diagram, start with Package diagrams.

ElementSyntax
Packagepackage "Name" { ... }
Classifierclass, interface, enum
Relationsa ..> b, a --> b, a --|> b, a ..|> b
Import and mergea ..> b : <<import>>
Containmenta +-- b
Notenote a: text
diagram package "All the package elements"
direction right

package App {
  class Handler
}
package Core {
  interface Store
  class SqlStore
  SqlStore ..|> Store
}
App ..> Core : <<import>>
note App: Only depends on Core.
All the package elements App Handler Core «interface» Store SqlStore Only depends on Core. «import»

See Package diagrams for how to write one, and the grammar for every statement.