0

How can I access all instances of an association with an OCL expression.

Suppose I have an association name in a variable named refName, which is the name of an association from class A to class B. For a given instance of A (say a) how can I access the value of refName which would be apparently SET(B)?

Note that refName is not the name of the association, but a variable which its value is the name of the association! So, a.refName is not working!

Thanks

qartal
  • 2,024
  • 19
  • 31

1 Answers1

0

I could solve this problem in the context of ATL and OCL implementation in EMF, but this would apply ( I think ) generally for any OCL implementation:

Read the solution here: https://www.eclipse.org/forums/index.php/t/806754/

qartal
  • 2,024
  • 19
  • 31