Previous UML Classes Table of Contents UML Packages Next


7.3.5 BehavioralFeature

Kernel


   A behavioral feature is a feature of a classifier that specifies an aspect of the behavior of its instances.

*Generalizations

*Description

   A behavioral feature specifies that an instance of a classifier will respond to a designated request by invoking a behavior. BehavioralFeature is an abstract metaclass specializing Feature and Namespace . Kinds of behavioral aspects are modeled by subclasses of BehavioralFeature.

*Attributes

   No additional attributes

*Associations

   • ownedParameter: Parameter[*] Specifies the ordered set of formal parameters owned by this BehavioralFeature. The parameter direction can be ‘in,’ ‘inout,’ ‘out,’ or ‘return’ to specify input, output, or return parameters. Subsets Namespace ::ownedMember

   • raisedException: Type[*] References the Types representing exceptions that may be raised during an invocation of this operation.

*Constraints

   No additional constraints

*Additional Operations

   [1] The query isDistinguishableFrom() determines whether two BehavioralFeatures may coexist in the same Namespace . It specifies that they have to have different signatures.

   BehavioralFeature::isDistinguishableFrom(n: NamedElement , ns: Namespace ): Boolean;isDistinguishableFrom =if n.oclIsKindOf(BehavioralFeature)thenif ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))->notEmpty()then Set{}->including(self)->including(n)->isUnique(bf | bf.ownedParameter->collect(type))else trueendifelse trueendif

*Semantics

   The list of owned parameters describes the order, type, and direction of arguments that can be given when the BehavioralFeature is invoked or which are returned when the BehavioralFeature terminates.

   The owned parameters with direction in or inout define the type, and number of arguments that must be provided when invoking the BehavioralFeature. An owned parameter with direction out, inout, or return defines the type of the argument that will be returned from a successful invocation. A BehavioralFeature may raise an exception during its invocation.

*Notation

   No additional notation