UML基本架构建模--通用机制的通用建模技术(二)

Modeling New Properties

新特性建模

The basic properties of the UML’s building blocks—–attributes and operations for classes, the contents of packages, and so on—-are generic enough to address most of the things you’ll want to model. However, if you want to extend the properties of these basic building blocks, you need to define stereotypes and tagged values.

UML构建模块的基本特性--类属性和操作,,包的内容等等--一般足以解决你想建模的大部分东西.然而,如果你想扩展这些基本构建模块的特性,你需要定义版式和标签值.

To model new properties,

s not already a way to express what you want by using basic UML.

re convinced there’s no other way to express these semantics, define a stereotype and add the new properties to the stereotype. The rules of generalization apply—-tagged values defined for one kind of stereotype apply to its children.

For example, suppose you want to tie the models you create to your project’s configuration management system. Among other things, this means keeping track of the version number, current check in/check out status, and perhaps even the creation and modification dates of each subsystem. Because this is process-specific information, it is not a basic part of the UML, although you can add this information as tagged values. Furthermore, this information is not just a class attribute either. A subsystem’s version number is part of its meta-data, not part of the model.

Figure 6-10 shows three subsystems, each of which has been extended with the stereotype to include its version number and status.

Note: The values of tags such asversion andstatus are things that can be set by tools. Rather than setting these values in your model by hand, you can use a development environment that integrates your configuration management tools with your modeling tools to maintain these values for you.

大海,别为森林的渺小而沮丧,

UML基本架构建模--通用机制的通用建模技术(二)

相关文章:

你感兴趣的文章:

标签云: