Joaquin Miller (email@example.com)
Mon, 11 Feb 2002 10:00:08 -0800
Thanks. My answer will not be authoritative. However, i am the guy who pushed into UML 1 the concept that associations may be specialized and generalized. In UML 1, a constraint may be applied to any model element. So a stereotype may be applied to any UML concept (except those that are just elements, and have not been promoted to model element). As with many popular uses of stereotypes, this is not actually necessary, as the same effect can be achieved by specifying a generic association with the desired restrictions. That is a much cleaner approach when the constraint is intended to constrain the specification, rather than being intended to constrain or extend the language. (Actually, use of a stereotype to constrain the specification is simply wrong, though popular. We can blame its popularity on the use of stereotypes in the UML specification to constrain the model there (the UML metamodel).) However, UML 1 makes it very awkward (and ugly) to use generic associations, and tools make use of stereotypes very convenient (though they mostly proceed to ignore the stereotypes). So use of a stereotype to restrict an association in UML 1 is fine. UML 2 will clean this up, the God willing (and the pUMLers do their political work). >I mean can I define a stereotype that assumes or restricts the semantics >of Associations, as we define for example <<basic types attribute>> which >restricts the attributes of a class to assume a primitive data type > >>>Hello everybody >>>Thanks to all who answered my previous questions >>>about stereotypes in UML, and I'm sorry because I have >>>a new question which is simply >>>Does UML consider Association as a model element that can >>>be extended?. >>>my question is based on the UML document version 1.1 >>>please if you can help reply me >>>Thanks for your time >>>Ahmad Gaafar >> >>This is an interesting question. And i may have an answer for you. But >>first i have to ask: what do you mean by 'extend,' exactly?