Previous Table of Contents Next


11.8.1 BehavioralFeature


Description

   Constructs::BehavioralFeature reuses the definition of BehavioralFeature from Abstractions::BehavioralFeatures. It adds specializations to Constructs::Namespace and Constructs::Feature.

Generalizations Attributes

   No additional attributes

Associations

   • ownedParameter: Parameter[*] Specifies the ordered set of formal parameters of this BehavioralFeature. Subsets Namespace::ownedMember.

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

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)then

   if ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))->notEmpty()then Set{}->include(self)->include(n)->isUnique( bf | bf.ownedParameter->collect(type))else trueendif

   else 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