Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Is it possible to retrieve the type name?
Is it possible to retrieve the type name? [message #787493] Tue, 31 January 2012 16:40 Go to next message
Luca Gherardi is currently offline Luca Gherardi
Messages: 60
Registered: November 2010
Member
Hi all,

Is there a way for retrieving the type name of an object in OCL?
I need something like the java method getClass().

Thanks,
Luca
Re: Is it possible to retrieve the type name? [message #787559 is a reply to message #787493] Tue, 31 January 2012 18:11 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4094
Registered: July 2009
Senior Member
Hi Luca

Yes. oclType().

In the new pivot implementation, using the Examples plugins, this
supports full reflection so oclType().name.

oclType() is not implemented in the legacy implementations for Ecore or
UML bindings.

Regards

Ed Willink

On 31/01/2012 16:40, Luca Mising name wrote:
> Hi all,
>
> Is there a way for retrieving the type name of an object in OCL?
> I need something like the java method getClass().
>
> Thanks,
> Luca
Re: Is it possible to retrieve the type name? [message #787638 is a reply to message #787559] Tue, 31 January 2012 20:30 Go to previous messageGo to next message
Luca Gherardi is currently offline Luca Gherardi
Messages: 60
Registered: November 2010
Member
Does this mean that I cannot use it in Eclipse GMF for diplaying a type name in a label?

Thank you very much!!
Luca
Re: Is it possible to retrieve the type name? [message #787659 is a reply to message #787638] Tue, 31 January 2012 21:02 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4094
Registered: July 2009
Senior Member
Hi

Sorry, I'm forgetting. The legacy implementation potentially allows the
non-OCL eClass().name.

Regards

Ed Willink

On 31/01/2012 20:30, Luca Mising name wrote:
> Does this mean that I cannot use it in Eclipse GMF for diplaying a
> type name in a label?
>
> Thank you very much!!
> Luca
Previous Topic:Is it possible to modify condition collections of cycle?
Next Topic:Check invariants without instantiation
Goto Forum:
  


Current Time: Thu Oct 23 09:32:10 GMT 2014

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

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