Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
5 6
1
Common Divisions Adornments
Stereotypes Stereotypes(cont’d)
Example: If you are modelling a network
Extend the vocabulary of the UML by you might want to have symbols for
creating new model elements routers and hubs.
derived from existing ones but that Can make use of stereotyped nodes so
that they appear as primitive building
have specific properties suitable for
blocks
your domain/problem
Another example: In Java, you sometimes
Each stereotype defines a set of have to model classes such as exceptions
properties that are received by Only want them to be thrown and caught
elements of that stereotype Can make them first class citizens in your
model, ie treating them like basic
building blocks, by marking them with a
11 12
suitable stereotype
2
Stereotypes(cont’d) Stereotypes(cont’d)
13 HumiditySensor 14
Properties for specifying key-value pairs Not the same as a class attribute
of model elements, where keywords are Can think of a tagged value as a
attributes metadata, since its value applies to the
Extend the properties of a UML building element itself and not its instances
block, allowing you to create new Example: In the release team of a project
information in that elements specification that is responsible for assembling,
Can be defined for existing elements of testing and deploying releases, you
the UML might want to keep track of the version
You can also define tags that apply to number and test results for each major
individual stereotypes . Then, everything subsystem
with that stereotype will have that tagged Can use tagged values to add this
value 15 information to your models 16
3
Constraints Constraints(cont’d)
19 20
Constraints(cont’d) Constraints
4
Summary(cont’d) References
Four common mechanisms: The Unified Modelling Language User
Specifications Guide by Rumbaugh, Jacobson and Booch
Common divisions [Addison-Wesley]
Adornments The Unified Modelling Language
Notes Reference Manual by Rumbaugh,
Extensibility mechanisms Jacobson and Booch [Addison-Wesley]
Stereotypes Using UML, Software Engineering with
Tagged values Objects and Components by Perdita
Constraints Stevens and Rob Pooley
25 26