Search code examples
umlclass-diagram

UML diagram: How to show interface that is implemented by most of the Classes in my class diagram


I have a interface like:

public interface MyEntity {

    //HIbernate version
    public long getOptLock();

    //these method are used to keep track of Last modified timestamp 
    public void update();

    public void persist();

}

Which is implemented by most of the classes in my object model. Now, i know how to show a interface realisation in a Class diagram.

The problem is since this particular interface is implemented by most of the classes it is making the class diagram cluttered. Is there a altenative way to show interface realisation?


Solution

  • The alternative way is to use the lollipop notation, right above every class that implements the interface:

    See this image from msdn website.

    For the full article see this link.