UML 2.4 RTF Avatar
  1. OMG Issue

UML24 — Enumeration Literal

  • Key: UML24-42
  • Legacy Issue Number: 15107
  • Status: closed  
  • Source: NASA ( Dr. Maged Elaasar)
  • Summary:

    EnumerationLiteral specializes InstanceSpecification, which specializes PackageableElement, which inturn specializes NamedElement

    This allows enum lterals to be owned by packages and have visibility, both of which do not make a lot of sense.

    is it another case of unintended inheritance?

    Another note: does it make sense to couple the capabilities of having a 'name' and 'visibilty', as given by NamedElement?

  • Reported: UML 2.3 — Fri, 15 Jan 2010 05:00 GMT
  • Disposition: Resolved — UML 2.4
  • Disposition Summary:

    There is another related problem. The derivation of EnumerationLiteral::/classifier is simply “enumeration”,
    but EnumerationLiteral::/classifier is [1..1] and EnumerationLiteral::enumeration is [0..1]. Creating a literal
    in a package and then asking for its classifier would cause some kind of unpleasant run-type exception.
    Since an EnumerationLiteral surely must be owned by an Enumeration, fix this by changing the multiplicity
    of EnumerationLiteral::enumeration to [1..1].
    As for the visibility, unless we change the metamodel we are stuck with it. Indeed, the constraint namespace_
    needs_visibility forces the visibility to be present.

  • Updated: Fri, 6 Mar 2015 20:58 GMT