Instance Specification
Explanation
Section titled “Explanation”An instance specification is a UML model element that represents an instance in a modeled system. An instance is one concrete thing, such as one particular customer. (See the article UML Class Diagram for how classes describe things in general.)
Class versus instance. A class, more generally called a classifier, describes a set of instances that share features. An instance specification identifies just one of them.
Where it appears. Object diagrams use instance specifications. Each object and link on such a diagram is modeled as one. An object diagram is a graph of instances, including objects and data values. It is more concrete than a class diagram.
Names. The name of the instance and the name of its classifier are both optional. An anonymous instance of an unnamed classifier is written as an underlined colon.
Slots. A slot corresponds to one attribute or feature. It may hold a value for that feature. Slots appear in a compartment beneath the instance name. Written as text, a slot is the feature name, an equal sign, and the value. For example: status = open.
Why use them. Object diagrams give examples for a class diagram or act as test cases for it. They make an abstract class model concrete.
Example
Section titled “Example”A class diagram says that an Order has a status and a total. An object diagram adds one instance specification for a single order. Its slots read status = open and total = 40. A second, anonymous instance shows another order. A reviewer can now check that the class model fits realistic cases.
Trade-offs
Section titled “Trade-offs”An instance specification shows one case, or a few. It does not replace the class model, which covers the whole set of instances.
Diagram source
@startumlclass Order { status : String total : Integer}object "o1 : Order" as o1 { status = open total = 40}object "anonymous : Order" as o2 { status = paid}o1 ..> Order : <<instantiate>>o2 ..> Order : <<instantiate>>@endumlChecks
Section titled “Checks”- Object diagrams model each object and link as an instance specification.
- Object diagrams are used to give examples or test cases for the class diagram.
- Slots show feature values as a feature name, an equal sign and a value.
Related
Section titled “Related”- UML Class Diagram
- Unified Modeling Language (UML)
- UML Structure Diagram
- UML Modeling Best Practice
- UML Class Diagram Relationship
Sources
Section titled “Sources”- — site.uottawa.ca, accessed 2026-11-09
- Object diagram - Wikipedia — en.wikipedia.org, accessed 2026-11-09
- From Aristotle to EA: a type theory for EA — grahamberrisford.com, accessed 2026-11-09