'How should I denote static classes in UML?
Solution 1:[1]
I would just use a stereotype <<static>>
Solution 2:[2]
IMO static classes (like in C#) should not even be used in OO Design. A static class cannot be instantiated and thus is actually not a class regarding UML semantics.
You could mark the class as "leaf" (no subclasses) and add a constraint which does not allow non-static members. This would resemble the meaning of the C# static keyword.
Solution 3:[3]
The <<utility>> stereotype is what you are looking for.
It's defined in UML Standard Profile (as per UML 2.5 documentation) as:
A class that has no instances, but rather denotes a named collection of attributes and operations, all of which are static.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | gefei |
| Solution 2 | Christian |
| Solution 3 | M.Sameer |
