How to include methods from private classes in a communication diagram UML?

309 Views Asked by At

I'm wondering how does one include methods from private classes in a communication diagram UML? Do you only include the method even though it's from a private class or do you include the method and make some sort of note that the method is from a private class?

2

There are 2 best solutions below

1
On

Communication diagrams generally do not show public vs. private. If you want, I suppose you could add a stereotype <> to the class name to that effect. In the class diagram, nested private classes will be displayed using visibility marks. I think both diagrams are important for conveying your intent.

See: http://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell/ and http://www.holub.com/goodies/uml/index.html

0
On

All communication diagram (SD and AD) show the source of the message as the object itself and never the method from where the message is sent. You see only the methods that are called. And those are always public.