I want to know what is the equivalent of "OclAsType" in ATL?
I see in some transformation, select and oclIsKindOf are used.
In the figure below, I wanna to access "name" attribute of "SubSubElement" class.
when I write the below code I have an error. What can I do?
s : MM!Exp
class <- s.ref.oclIsKindOf(MM!SubElement).oclIsKindOf(MM!SubSubElement).name
Ow! The operations oclIsNew() and oclAsType() defined by OCL are currently not supported by the ATL engine.
Omitting oclIsNew() is very understandable, it is very hard and very costly to support and I've yet to want to use it. Omitting oclAsType() is very unfortunate. It is very useful and very easy to implement. I see no Bugzilla requesting it.
I guess that the justification is that a declaration transformation language does pattern matching and so assignments do oclAsType automatically or fail.