Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Getting type of Property by reflection
Getting type of Property by reflection [message #61863] Tue, 02 September 2008 09:38 Go to next message
Stefan Schulze is currently offline Stefan Schulze
Messages: 70
Registered: July 2009
Member
Hi...

is it possible to get the type of a property without knowing it's concrete
class? I expected something like UMLReflection::getType(P):C, but I found
nothing.

Stefan
Re: Getting type of Property by reflection [message #61886 is a reply to message #61863] Tue, 02 September 2008 09:49 Go to previous messageGo to next message
Stefan Schulze is currently offline Stefan Schulze
Messages: 70
Registered: July 2009
Member
Hi again...

Same for UMLReflection::isReadOnly(P):Boolean.
Is there any alternative to this?

Stefan
Re: Getting type of Property by reflection [message #61958 is a reply to message #61863] Mon, 08 September 2008 18:26 Go to previous messageGo to next message
Eclipse User
Originally posted by: cdamus.zeligsoft.com

Hi, Stefan,

Sorry for the vacation delay ... well, not really ;-)

UMLReflection::getOCLType(Object) returns the type of an attribute or an
operation. It does, actually, coerce the metamodel-specific primitive
types to their corresponding OCL pre-defined types (a subject you know
well), so hopefully that's not a problem for you.

cW

Stefan Schulze wrote:
> Hi...
>
> is it possible to get the type of a property without knowing it's concrete
> class? I expected something like UMLReflection::getType(P):C, but I found
> nothing.
>
> Stefan
>
>
Re: Getting type of Property by reflection [message #61982 is a reply to message #61886] Mon, 08 September 2008 18:27 Go to previous message
Eclipse User
Originally posted by: cdamus.zeligsoft.com

Hi, Stefan,

No, there is no such facility. Whether a property is read-only or not
is uninteresting to OCL, as it cannot modify the state of the system,
anyway.

Cheers,

Christian


Stefan Schulze wrote:
> Hi again...
>
> Same for UMLReflection::isReadOnly(P):Boolean.
> Is there any alternative to this?
>
> Stefan
>
>
Previous Topic:[Announce] MDT OCL 1.2.2 M200809031221 is available
Next Topic:OCL parsing invariants
Goto Forum:
  


Current Time: Thu Oct 23 05:57:48 GMT 2014

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

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