Is there any Java API (Opensource) that can be used in drawing/creating UML diagrams.
JFreeChart is a Java API to draw charts/bars/graphs, similarly is there any tool to draw UML diagrams using Java ?
If you want to create class diagrams, this tutorial shows how to do it with eclipse draw2d.
You could check the EMF-based implementation of the UMLTM 2.4.1 metamodel for the Eclipse platform.
This will allow you to create the UML diagrams. Then you could use any EMF-UML compatible tool to visualize them
I was looking for a similar thing and then I found about this open source project called PlantUML. They have some good example and pretty much cover everything that you may have wanted.
来源:https://stackoverflow.com/questions/11431597/java-api-to-create-uml-diagrams