Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » LiteralSpecification
LiteralSpecification [message #477665] Thu, 07 August 2008 15:34 Go to next message
Timothy Marc is currently offline Timothy MarcFriend
Messages: 547
Registered: July 2009
Senior Member
Hi all,

i have a question concerning the LiteralSpecification abstract class. I
think it should have a value-Attribute, that has a general type and the
subclasses should redefine that value attribute to the specific type. I
don't know, whether it is possible to provide such a general type for the
value-Attribute, but IMHO, that would provide a better programatically
access to the values of a LiteralSpecification subclass.

What are your opinions for that topic?

Thx
Timothy
Re: LiteralSpecification [message #477675 is a reply to message #477665] Mon, 11 August 2008 22:59 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Timothy,

The LiteralSpecification metaclass inherits a stringValue() operation
from the ValueSpecification metaclass. It converts the value to a string.

Does that help?

The problem with defining a value attribute that would be redefined by
the subclasses is that UML doesn't have a primitive type that it could
use in defining a LiteralSpecification::value. There is no primitive
type that UML's four standard types conform to. Moreover, because
primitive types are value-based, not identity-based, you can't provide a
useful general type, in contrast with identity (reference) types where
you could define Object as the most general type.

Cheers,

Christian


Timothy Marc wrote:
> Hi all,
>
> i have a question concerning the LiteralSpecification abstract class. I
> think it should have a value-Attribute, that has a general type and the
> subclasses should redefine that value attribute to the specific type. I
> don't know, whether it is possible to provide such a general type for the
> value-Attribute, but IMHO, that would provide a better programatically
> access to the values of a LiteralSpecification subclass.
>
> What are your opinions for that topic?
>
> Thx
> Timothy
>
>
Re: LiteralSpecification [message #626867 is a reply to message #477665] Mon, 11 August 2008 22:59 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Timothy,

The LiteralSpecification metaclass inherits a stringValue() operation
from the ValueSpecification metaclass. It converts the value to a string.

Does that help?

The problem with defining a value attribute that would be redefined by
the subclasses is that UML doesn't have a primitive type that it could
use in defining a LiteralSpecification::value. There is no primitive
type that UML's four standard types conform to. Moreover, because
primitive types are value-based, not identity-based, you can't provide a
useful general type, in contrast with identity (reference) types where
you could define Object as the most general type.

Cheers,

Christian


Timothy Marc wrote:
> Hi all,
>
> i have a question concerning the LiteralSpecification abstract class. I
> think it should have a value-Attribute, that has a general type and the
> subclasses should redefine that value attribute to the specific type. I
> don't know, whether it is possible to provide such a general type for the
> value-Attribute, but IMHO, that would provide a better programatically
> access to the values of a LiteralSpecification subclass.
>
> What are your opinions for that topic?
>
> Thx
> Timothy
>
>
Previous Topic:Setting Is Unique property - where is it implemented?
Next Topic:Compatable UML Editors
Goto Forum:
  


Current Time: Sun Mar 29 15:46:04 GMT 2020

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

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

Back to the top