The UML annotations for a class or interface are stored at the end of their Java Doc. In general, we can find two kinds of annotations:
@UML.Stereotypes
@UML.Dependencies
We take an example of user-defined stereotype JDO, which contains an attribute “table” of type String to indicate the storage in relational database.
If we provide the “ COMPANY” value to attribute “ table”, this stereotype will be stored in the class tags:
/** * */ @UML.Stereotypes(@Stereotype(value = "JDO::JDOClass",
properties = @Property(n = "table", v = "COMPANY")))
public class Company
{
}