Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Derived feature in OCL
Derived feature in OCL [message #628478] Mon, 31 May 2010 09:28
Karel Smutny is currently offline Karel Smutny
Messages: 22
Registered: July 2009
Junior Member
Hello all,

How would one define a derived feature in OCL, please? There is a nice presentation showing operation bodies and invariant constraints in OCL, they are then directly generated into code.

How can I do the same for derived features?

Let's assume there is a class

class A {
+ /a: B [*] {union}
+ /b: B [*] {subsets a}
}

I have tried to:

- define getB(): B[*] method, but the genmodel wizard has complained (applying EReference stereotype and setting transient and volatile to true didn't help)
- define a badicGetB(): B[*], but there were two such method generated (one from a model, one to be implemented by me)

Thank you for any help,
Karel
Previous Topic:Derived feature in OCL
Next Topic:how to add stereotype to lifeline?
Goto Forum:
  


Current Time: Tue Jul 22 13:35:55 EDT 2014

Powered by FUDForum. Page generated in 0.01413 seconds