Unified Modeling Language Reference Manual, The, Second Edition
by James Rumbaugh, Ivar Jacobson, Grady Booch
singleton
A class that has (by declaration) exactly one instance. A singleton is a way to represent global knowledge in an application, yet keep it within an object-oriented framework.
Semantics
Every application must have at least one singleton class (often implicitly) to establish the context for the application. Often, the singleton class equates to the application itself and is implemented by the control stack and address space on a computer.
A singleton must exist within a context declaring its scope, such as a structured class or component. Often the context is a structured class representing the complete system.
Notation
A singleton is shown as a class symbol with a small '1' in the upper right corner (Figure 14-251). This value represents ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access