Software Disclaimer

Abstract Class UML 2.5::MessageEnd


MessageEnd is an abstract specialization of NamedElement that represents what can occur at the end of a Message.

Direct Superclasses: NamedElement

Direct Subclasses: MessageOccurrenceSpecification, Gate

Class Precedence List: MessageEnd, NamedElement, Element


message : Message (0 1); -- source MessageEnd
clientDependency : Dependency (0 *); -- source NamedElement
name : String (0 1); -- source NamedElement
nameExpression : StringExpression (0 1); -- source NamedElement
namespace : Namespace (0 1); -- source NamedElement
qualifiedName : String (0 1); -- source NamedElement
visibility : VisibilityKind (0 1); -- source NamedElement
ownedComment : Comment (0 *); -- source Element
ownedElement : Element (0 *); -- source Element
owner : Element (0 1); -- source Element


No additional constraints.


Signature: oppositeEnd() : MessageEnd;
Description: This query returns a set including the MessageEnd (if exists) at the opposite end of the Message for this MessageEnd.
Expression: result = (message->asSet().messageEnd->asSet()->excluding(self))

Signature: isSend() : Boolean;
Description: This query returns value true if this MessageEnd is a sendEvent.
Expression: result = (message.sendEvent->asSet()->includes(self))

Signature: isReceive() : Boolean;
Description: This query returns value true if this MessageEnd is a receiveEvent.
Expression: result = (message.receiveEvent->asSet()->includes(self))

Signature: enclosingFragment() : InteractionFragment;
Description: This query returns a set including the enclosing InteractionFragment this MessageEnd is enclosed within.
Expression: result = (if self->select(oclIsKindOf(Gate))->notEmpty() then -- it is a Gate let endGate : Gate = self->select(oclIsKindOf(Gate)).oclAsType(Gate)->asOrderedSet()->first() in if endGate.isOutsideCF() then endGate.combinedFragment.enclosingInteraction.oclAsType(InteractionFragment)->asSet()-> union(endGate.combinedFragment.enclosingOperand.oclAsType(InteractionFragment)->asSet()) else if endGate.isInsideCF() then endGate.combinedFragment.oclAsType(InteractionFragment)->asSet() else if endGate.isFormal() then endGate.interaction.oclAsType(InteractionFragment)->asSet() else if endGate.isActual() then endGate.interactionUse.enclosingInteraction.oclAsType(InteractionFragment)->asSet()-> union(endGate.interactionUse.enclosingOperand.oclAsType(InteractionFragment)->asSet()) else null endif endif endif endif else -- it is a MessageOccurrenceSpecification let endMOS : MessageOccurrenceSpecification = self->select(oclIsKindOf(MessageOccurrenceSpecification)).oclAsType(MessageOccurrenceSpecification)->asOrderedSet()->first() in if endMOS.enclosingInteraction->notEmpty() then endMOS.enclosingInteraction.oclAsType(InteractionFragment)->asSet() else endMOS.enclosingOperand.oclAsType(InteractionFragment)->asSet() endif endif)

Send questions or comments to [email protected].