Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Get Metamodel EAnnotation from meta class instance
Get Metamodel EAnnotation from meta class instance [message #424456] Mon, 27 October 2008 16:29 Go to next message
Gebhart is currently offline GebhartFriend
Messages: 1
Registered: July 2009
Junior Member
I have a class instance ("Domain") and i would like to get the
eannotations ("documentation") defined into the EClass "Domain" of my
metamodel.

How can i get the EAnnotations defined in my metaclass "Domain" from a
"Domain" instance in JAVA Language?

Metamodel:

ECLass: Domain
|_ _ _ EAnnotation: "Documentation"
Re: Get Metamodel EAnnotation from meta class instance [message #424457 is a reply to message #424456] Mon, 27 October 2008 16:46 Go to previous message
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
If you are using the details (key, value pairs) the easiest way is to
use EcoreUtil.getAnnotation(). If you are using the reference or
contents, then you will probably have to use:

instance.eClass().getEAnnotation(String) or getAnnotations()

Bryan

On 2008-10-27 11:29:34 -0500, guillaume Gebhart
<guillaume.gebhart@obeo.fr> said:

> I have a class instance ("Domain") and i would like to get the
> eannotations ("documentation") defined into the EClass "Domain" of my
> metamodel.
>
> How can i get the EAnnotations defined in my metaclass "Domain" from a
> "Domain" instance in JAVA Language?
>
> Metamodel:
>
> ECLass: Domain
> |_ _ _ EAnnotation: "Documentation"
Previous Topic:[CDO] NPE when restarting the server
Next Topic:Table representation of a tree
Goto Forum:
  


Current Time: Fri Apr 26 18:43:02 GMT 2024

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

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

Back to the top