Class

A set of objects with identical characteristics.

In the Unified Modeling Language (UML) a Class is a kind of EncapsulatedClassifier whose Features are Properties, Operations, Receptions, Ports and Connectors.

Attributes of a Class are Properties that are owned by the Class. Some of these attributes may represent the ends of binary Associations.

Objects of a Class must contain values for each attribute that is a member of that Class, in accordance with the characteristics of the attribute, for example its type and multiplicity.

When an object is instantiated in a Class, for every attribute of the Class that has a specified default, if an initial value of the attribute is not specified explicitly for the instantiation, then the default ValueSpecification is evaluated to set the initial value of the attribute for the object.

Operations of a Class can be invoked on an object, given a particular set of values for the parameters of the Operation, according to the semantics specified in UML

A Class cannot access private Features of another Class, or protected Features on another Class that is not its ancestor.

A Class acts as the namespace for various kinds of Classifiers defined within its scope, including Classes. Nested Classifiers are members of the namespace of the containing Class. Classifier nesting is used for reasons of information hiding.

A Class may be designated by setting isActive to true as active (i.e., each of its instances is an active object). When isActive is false the Class is passive (i.e., each of its instances executes within the context of some other object).

An active object is an object that, as a direct consequence of its creation, commences to execute its classifierBehavior, and does not cease until either the complete Behavior is executed or the object is terminated by some external object. (This is sometimes referred to as ‘the object having its own thread of control.’) The points at which an active object responds to communications from other objects is determined solely by the Behavior of the active object and not by the invoking object. If the classifierBehavior of an active object completes, the object is terminated.

A Class’s Receptions specify which Signals the instances of this Class handle.

An InstanceSpecification may be used to specify the initial value to be created for a Class.

All instances corresponding to parts and ports of a Class are destroyed recursively, when an instance of that Class is deleted.

A Class may act as a metaclass in the definition of Profiles and metamodels.

Leave a Comment