The UML annotations for a package are stored at the end of their Java Doc in the file package-info.java in the package folder, following the JDK 1.5 specifications. For the first time, if the file package-info.java doesn’t exist, the JavaDoc in the file package.xml will be read if it exists. And afterwards, the new modification will create a file package-info.java.
In general, we can find three kinds of tags:
@uml.stereotype
@uml.dependency
@uml.dependencyStereotype
It is possible to specify a stereotype for a package. In the following diagram, the package “ gui” has a stereotype “framework”.
This stereotype specification is stored in the file package-info.java in the package “ gui”.
This stereotype specification is stored in the file package-info.java in the package “ gui”:
/** * @uml.stereotype uml_id="Basic::Framework" */ package gui;
In the following example, the package “ gui” has a user-defined dependency of type Realization with the package “ database”.
This dependency is stored in the file package-info.java in the package “ gui”:
/** * @uml.dependency supplier="database" * stereotypes="Basic::Responsibility" */ package gui;