Previous Table of Contents Next


9.1.1 BehavioralFeature


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

   Description

   A behavioral feature is a feature of a classifier that specifies an aspect of the behavior of its instances. BehavioralFeature is an abstract metaclass specializing Feature and Namespace. Kinds of behavioral aspects are modeled by subclasses of BehavioralFeature.

   Generalizations

   Attributes

   No additional attributes

   Associations

   • / parameter: Parameter[*] — Specifies the parameters of the BehavioralFeature. Subsets Namespace::member. This is a derived union and is ordered.

   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{}->including(self)->including(n)->isUnique( bf | bf.parameter->collect(type))else trueendif

   else trueendif

   Semantics

   The list of parameters describes the order and type of arguments that can be given when the BehavioralFeature is invoked.

   Notation

   No additional notation