Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Class reflection
[ATL] Class reflection [message #533256] Wed, 12 May 2010 14:26 Go to next message
Eclipse UserFriend
Originally posted by: morlop.removethis.gmail.com

Dear All,
I wonder if there is a way in ATL to find out the references and
atributes an element from a model has in a transformation. Something
similar to what Java has in its reflection API.

All the best,

V. López
Re: [ATL] Class reflection [message #533801 is a reply to message #533256] Mon, 17 May 2010 03:42 Go to previous messageGo to next message
Eclipse UserFriend
You can use the EMF reflective operations in ATL.
Let's say you have :
from s : AA!BB

you can do :
s.eClass() (this will get the EClass of that element) and then use the EMF Ecore APIs. ex : .eAllStructuralFeatures() or .eAllReferences() and so on.
Re: [ATL] Class reflection [message #533802 is a reply to message #533256] Mon, 17 May 2010 03:43 Go to previous messageGo to next message
Eclipse UserFriend
and then, instead of eSet or eGet, you can use refSetValue and refGetValue :

s.refSetValue($nameofthestructuralfeaturetoset,value)
s.refGetValue($nameofthestructuralfeaturetoset)
Re: [ATL] Class reflection [message #533815 is a reply to message #533802] Mon, 17 May 2010 04:05 Go to previous message
Eclipse UserFriend
Originally posted by: morlop.removethis.gmail.com

Thank you very much for your help.

El 17/05/2010 9:43, Sylvain EVEILLARD escribió:
> and then, instead of eSet or eGet, you can use refSetValue and
> refGetValue :
>
> s.refSetValue($nameofthestructuralfeaturetoset,value)
> s.refGetValue($nameofthestructuralfeaturetoset)
Previous Topic:[ATL]Can someone Check my below Ant Build file ,Why it generates error ?
Next Topic:exit
Goto Forum:
  


Current Time: Fri Jul 04 10:49:24 EDT 2025

Powered by FUDForum. Page generated in 0.06503 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top