Skip to content

Class method interactions

Leon Starr edited this page Aug 5, 2021 · 6 revisions

Certain classes define one or more methods. If so, you will see them on the relevant class diagram underneath the attribute compartment. When a method is called, it is invoked on a specific instance of its class. Unlike an event which is dispatched and serviced asynchronously, a method is called directly from the action language within some activity of a state or by a domain or external entity operation. The method executes within the activity's context immediately returning any values that may be defined, much like calling a function or method in a programming language.

This sort of interaction can be represented on the collaboration diagram. It will be associated with an arrow with a solid arrow head to denote that it is a synchronous interaction, as opposed to a singal/event type of interaction.

To keep a collaboration diagram from being too cluttered, interaction parameters are often omitted. In the example above, the method call parameters that you see on the class diagram do not appear.

Clone this wiki locally