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

Classifier

class, interface and enum declare a named box. An interface carries the keyword «interface», and an enumeration «enumeration». Other stereotypes join the keywords; <<abstract>> sets the name in italics instead.

diagram package "Classifiers"
direction right

class Order
interface Repository
enum Status
class Shape <<abstract>>
Classifiers Order «interface» Repository «enumeration» Status Shape

Looking for lollipops and sockets? Those are the interfaces of component diagrams.

Syntax

class|interface|enum <name> [as <alias>] [<<stereotype>>]

Classifiers cannot have bodies, so attributes and operations are not listed.

Specification

UML 2.5.1. Classifier notation and italics for abstract classifiers: 9.2.4 (p. 101). «interface» keyword: 10.4.4 (p. 172). «enumeration» keyword: 10.2.4 (p. 168).

Used in

Domain model, Plugin system.