How to present static class or function call in Sequence Diagram?
"In case of doubt, use comments, or stereotypes..."
Sequence Diagram:
+-------------+ +-------------------+
| <<class>> | | <<class>> |
| Cat | | FastFoodTerminal |
+------+------+ +---------+---------+
| |
| <<static>> |
| TurnOn() |
+--------------------------->+---+
| | |
+<---------------------------+<--+
| |
| Answer = |
| DoYouHaveCheeseBurger() |
+--------------------------->+---+
| | |
+<---------------------------+<--+
| |
Class Diagram:
+-------------------------------------------------+
| <<class>> |
| FastFoodTerminal |
+-------------------------------------------------+
| [+] void: FastFoodTerminal(); <<constructor>> |
| [#] int: ObtainMoneyDifference(); |
| [+] void: ReceiveMoney(); |
| [+] void: ReturnChange(); |
| [+] FastFoodTerminal: TurnOn(); <<static>> |
+-------------------------------------------------+
In this example, the "TurnOn()" is an static method that returns, an instance (object) of the "FastFoodTerminal" class.
So finally it is the use of stereotype to mention a static class/function. Underlining is no more applicable in UML 2.4.1 Aug 2011, page Page 86, under the headings Notation and Presentation Options