ModelDriven / Alf-Reference-Implementation

Open-source implementation of the Action Language for fUML (Alf) specification.
30 stars 2 forks source link

The wrapper interface for ExtensionEnd is missing #70

Closed seidewitz closed 5 years ago

seidewitz commented 5 years ago

An Extension is a kind of Association used to link a Stereotype to the metaclass that it is extending. The end of the association typed by the Stereotype is required to be an ExtensionEnd, which is a special kind of Property. There is currently a wrapper interface for Extension under org.modeldriven.alf.uml, but none for ExtensionEnd.

When a namespace search is done for possible Association end names that could be used in property access expressions, it is possible that an Extension is included in the search. In this case, however, if there is no specific wrapper for the ExtensionEnd, it gets wrapped as a NamedElement. But this then causes an ClassCastException, because any Association is expected to have Properties at its ends, and NamedElement cannot be cast to Property.

Therefore, any use of the reference implementation with a UML metamodel that implements the Stereotype abstract syntax needs to properly wrap ExtensionEnd. This indicates that there should be a wrapper interface for it, in order to reflect this.

seidewitz commented 5 years ago

Resolved in v1.1.0f.