29

In Java it's perfectly legal for an interface to extend an interface. Does this relationship in UML look like an "extends" relationship (solid line, closed, unfilled arrowhead) or an "implements" relationship (dotted line, close, unfilled arrowhead)? I can't seem to find an example of this relationship either online or in Fowler's book.

Martin Doms
  • 8,598
  • 11
  • 43
  • 60

1 Answers1

41

Use "extends" (solid line, closed, unfilled arrowhead), which is consistent with how Java uses the extends and implements keywords.

  • "extends" == UML generalization / specialization relationship
  • "implements" == UML realization relationship

The sub-interface is a specialization of the super-interface, not a realization of it.

See http://www.informit.com/articles/article.aspx?p=29224&seqNum=2

Example of interfaces extending interfaces.

Community
  • 1
  • 1
Bert F
  • 85,407
  • 12
  • 106
  • 123