How should I denote static classes in UML?

Marking a class as static is a very low level information, which we don't put in UML diagrams usually. UML 1.0 as well as 2.0 gives some flexibility to designer/developer to modify the convention if it suits to your audience/team.

You can put a note to that class, or use something like <<static>>( as used for interface).


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.


I would just use a stereotype <<static>>

Tags:

C#

Uml