[Xpand] Strange behaviour of polymorphism when using stereotypes [message #665332] |
Thu, 14 April 2011 11:08 |
Thomas  Messages: 1 Registered: April 2011 |
Junior Member |
|
|
Hi all,
i have encountered a strange problem when using polymorphism to resolve stereotypes applied to class properties or to association ends.
There is a stereotype "Generic", which is applicable to UML::Element.
This is the Xpand fragment in question:
«DEFINE typeArguments FOR xxx::Generic»
«do something»
«ENDDEFINE»
«DEFINE typeArguments FOR uml::Property»
«IF xxx::Generic.isInstance(this)»
/* ?! */
«ENDIF»
«ENDDEFINE»
The /* ?! */ marker indeed appears in the generated source code. When trying to EXPAND something requiring a xxx:Generic instead, an exception is thrown indicating the lack of a matching definition, however:
No Definition 'something for uml::Property' found!
Explicitly checking for the "Generic" stereotype and its tagged values can be used instead. Did i miss something about Xpand polymorphism or is this a bug in the interpreter?
Any help appreciated.
- Thomas
|
|
|
Powered by
FUDForum. Page generated in 0.01986 seconds