3.3 Standard UML tags for framework documentation

3.3 Standard UML tags for framework documentation

UML version 1.3 lists 47 stereotypes and seven tagged values (OMG, 2001). UML 1.4 considerably increased these numbers, but only a few of them are useful for framework documentation. Table 3.1 provides an overview.

Table 3.1. UML standard tags
Tag name Applies to Value type Description
implicit Association Boolean The association has no direct implementation, but may be of conceptual use only. For example, it may be derived from a combination of other associations (such as grandfather from father).
global Association Boolean A global variable is used to implement the association.
local Association Boolean A local variable within a method is used. The association is therefore temporary.
parameter Association Boolean The association is temporarily established through a method parameter (similar to a local variable).
implementationClass Class Boolean The class is implemented in a programming language.
type Class Boolean The class is used to specify a domain of instances together with their operation signatures

The implicit tag states that the association to which it is attached is not implemented through a standard technique, such as links from one class to another. The association may be of conceptual use or defined for modeling purposes only, without a counterpart in the implementation. Often, such an association can be derived through the combination of others. A common example is the association to all (and not only the direct) descendant parts in a part whole hierarchy. In this case, derived associations help us to clarify the diagrams but do not exist explicitly in an implementation. They are thus marked as implicit . In Figure 3.4, a comment provides additional information about how the association is derived from other modeling elements.

Figure 3.4. A derived implicit association
graphics/03fig04.gif

In several cases, an association may be realized through a global variable ( global ) that allows all objects to navigate to the desired object. The stereotype local is used to indicate that this is not a permanent association, but that association links only exist temporarily in a local variable during a method call. In similar fashion, the stereotype parameter describes a temporary association that is established through the parameter of a method call.

UML diagrams are applied in a wide variety of areas. During business analysis, a class can represent a real-world concept, and during design it may represent a high-level design concept. It sometimes happens that these classes do not have a counterpart in the actual implementation. Therefore, it is useful to discriminate the classes through appropriate tags. In the context of framework documentation, the implementation-level tags implementationClass and type are of particular interest. The former identifies classes that actually provide implementations. If a heterogeneous system implementation in different programming languages is necessary, this tag might be extended with values to denote the programming language in which a class is implemented. The type tag is used to explicitly mark certain classes as data types. A type corresponds to an abstract Java class or, more accurately, to a Java interface.

As mentioned above, standard UML offers a number of additional stereotypes, tagged values, and constraints but, in our experience, those listed in Table 3.1 are the ones that have turned out to be the most useful for describing frameworks. The standard UML constraints of 'complete', 'incomplete', 'disjoint', and 'overlapping' that apply to generalizations may also be of use. Through further enhancement of the UML-F tag concept below, these constraints are presented as tags in Table 3.2.[5]

[5] Often, stereotypes impose constraints on the elements to which they are attached. The boundary between standard UML constraints and stereotypes is not sharp. Therefore, UML-F treats these constraints also as tags.

Other standard UML stereotypes and tags become useful if their implementation or meaning is slightly modified. One example is the stereotype framework , which in standard UML is applied to packages only. There, it expresses that the contents of a package do not belong to any specific application but to a framework. Section 3.5 extends this stereotype to classes, and complements it with the application tag.

Table 3.2. UML tags for generalization
Tag name Applies to Value type Description
complete Generalization Boolean No new subclasses may be added. This also holds for already existing subclasses.
incomplete Generalization Boolean New subclasses may be added during design time.
disjoint Generalization Boolean Subclasses may not inherit from more than one direct superclass in the hierarchy (single inheritance is essential in Java and C# class hierarchies).
overlapping Generalization Boolean Subclasses may inherit from several superclasses in the hierarchy directly.



The UML Profile for Framework Architectures
The UML Profile for Framework Architectures
ISBN: 0201675188
EAN: 2147483647
Year: 2000
Pages: 84

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net