Search code examples
servletsumlclass-diagramstaruml

Represent multiple classes with just one class in a UML Class Diagram


I'm modeling a web application, which has some HTML pages, javascript files and 6 servlets.

Right now I have all the servlets in separate classes, but they all share the same methods (doPost, doGet, processRequest, with different implementations) and all of them have the <servlet> stereotype.

I was wondering if there is a way to represent all of them with one class. I'm going to do a text to describe the diagram, so maybe I can explain what that class represents.


Solution

  • As all the methods you cite (doPost, doGet, processRequest) seem to be inherited from Java's HttpServlet, you may as well represent all the implementations with their common parent class HttpServlet.