Problem Analysis  «Prev 

Different Class Views and Class Compartments

Additional class views

Many tools also support different views of the operations, for example, name, argument data types, and return data type only, or with fully expanded arguments.
Class without full signature
1) Class without full signature

Elided or hidden class details
2) Elided or hidden class details

The UML supports user-defined compartments as well. You can define virtually any type of information to append to a class by creating additional compartments. At this time, I am unaware of any tools that allow you to take advantage of this feature.


A graphical subdivision of a closed symbol, such as a class rectangle divided vertically into smaller rectangles. Each compartment shows properties of the element that it represents. Compartments come in three kinds: fixed, lists, and regions.


A fixed compartment has a fixed format of graphical and text parts to represent a fixed set of properties. The format depends on the kind of element. An example is a class name compartment, which contains a
  1. stereotype symbol and/or name,
  2. a class name, and
  3. a property string
that shows various class properties. Depending on the element, some of the information may be suppressible.
A list compartment contains a list of strings that encode constituents of the element. An example is an attribute list, where the encoding depends on the constituent type. The list elements may be shown in their natural order within the model, or they may be sorted by one or more of their properties (in which case, the natural order will not be visible). For example, a list of attributes could be sorted first on visibility and then on name. List entries can be displayed or suppressed based on the properties of the model elements. An attribute compartment, for instance, might show only public attributes. Stereotypes and keywords may be applied to individual entries by prepending them to the list entry. A stereotype or keyword may be applied to all subsequent entries by inserting it as a list entry by itself. They affect all subsequent list entries until the end of the list or another such running declaration. The string <<constructor>> placed on a separate line in an operation list would stereotype the subsequent operations as constructors, but the string «query» further down the list would revoke the first declaration and replace it by the <<quer>> stereotype.