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

Import and merge

A dashed arrow with an open head and a keyword in guillemets. «import» makes another package’s names public here, «access» makes them private, and «merge» merges the target into the source. The arrow points from the importing or receiving package to the imported or merged one.

diagram package "Import, access, merge"
direction right

package App
package Lib
package Util
package Base

App ..> Lib : <<import>>
App ..> Util : <<access>>
Lib ..> Base : <<merge>>
Import, access, merge App Lib Util Base «import» «access» «merge»

A nested package may import its parent, with the line ending on the inside of the boundary:

diagram package "Nested import"
package Core {
  package Scheduler
  Scheduler ..> Core : <<import>>
}
Nested import Core Scheduler «import»

Syntax

a ..> b : <<import>>
a ..> b : <<access>>
a ..> b : <<merge>>

Any <<x>> in a relation label becomes «x», so other keywords work the same way.

Specification

UML 2.5.1. Import and access: 7.4.4.3 (p. 29). Merge: 12.2.4 (p. 248).

Used in

Package merge, Library dependency graph, Layered architecture.