Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » assigning a default value to an inherited property
assigning a default value to an inherited property [message #627617] Wed, 20 May 2009 14:43
Szymon is currently offline SzymonFriend
Messages: 6
Registered: July 2009
Junior Member
Hi,

I am using uml2 and I have a problem with assigning a default value to an
inherited property.

In my uml model I have a class A with a property a. In a class B, which is
a child of A I would like to assign a default value for the property a. In
class B I use the same name for the property a.

When I try to generate the EMF model I get a warning "Discarded feature
'B::a' because it is a duplicate of inherited feature 'A::a'".
If I set the "Redefined Property" of B::a to point to A::a it is even
worse because I get an additional warning: "Feature 'B::a' should be
annotated as redefintion of feature 'A::a'".

Obviously when I generate a java code on the basis of my model the default
value is not assigned to the property a of class B.

Any idea how I could assign a default value to the property a of the class
B?

regards,
Szymon
Previous Topic:fUML_Library.uml
Next Topic:Generating Java-classes?
Goto Forum:
  


Current Time: Tue Apr 23 11:32:10 GMT 2024

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

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

Back to the top