BehavioralFeature (as specialized)

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

Attributes
No additional attributes.

Associations

formalParameter: Parameter[*] Specifies the ordered set of formal parameters of this BehavioralFeature. Subsets
BehavioralFeature::parameter and Namespace::ownedMember.
raisedException: Type[*] References the Types representing exceptions that may be raised during an invocation of
this feature.
returnResult: Parameter[*] Specifies the ordered set of return results of this BehavioralFeature. Subsets Behavioral-
Feature::parameter
and Namespace::ownedMember.

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.parameter->collect(type))
    else true
    endif
    else true
    endif

Semantics
The formal parameters define the type, and number, of arguments that must be provided when invoking the
BehavioralFeature. The return results define the type, and number, of arguments that will be returned from a successful
invocation. A BehavioralFeature may raise an exception during its invocation.

Notation
No additional notation.