Replacing UML2::NamedElement::isDistinguishableFrom with new operation i a profile? [message #586696] |
Thu, 08 February 2007 22:54 |
user Messages: 296 Registered: July 2009 |
Senior Member |
|
|
Hi,
I got a use case where I need to replace the built in
NamedElement::isDistinguishableFrom query with another customized query
that also considers the NamedElement::type in the comparison.
Is this possible to do with current UML2 implementation using a new
profile where I define a new overriden/redefined operation
isDistinguishableFrom() for a stereotype <<MyClass>> ?
----------------------------
NamedElement::isDistinguishableFrom(n:NamedElement, ns: Namespace): Boolean;
isDistinguishable =
if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType)
then
ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))- >isEmpty()
else true
---------------
thanks
/anders
|
|
|
Powered by
FUDForum. Page generated in 0.02832 seconds