[newbie] Basic Types in UML [message #628435] |
Wed, 05 May 2010 09:39  |
Eclipse User |
|
|
|
How can I use basic types, such as Map, String, etc?
Can I represent generic types (Map <String, String>) in UML (or can I do so only in OCL)?
|
|
|
Re: [newbie] Basic Types in UML [message #628438 is a reply to message #628435] |
Fri, 07 May 2010 12:56   |
Eclipse User |
|
|
|
Hi,
UML has a template construct call TemplateSignature that you can use to
define parameters for types. To see how it works, I suggest that you
look at the Ecore.UML model provided by the UML2 project, or convert any
Ecore model that defines generic types to UML.
As for OCL, it defines a few parameterized types in the standard
library, but provides no means to define new parameterized types of your
own nor even a syntax to for working with parameterized types in your
UML model. It's a pretty big hole in the language ...
HTH,
Christian
On 05/05/10 09:39 AM, orlin wrote:
> How can I use basic types, such as Map, String, etc?
>
> Can I represent generic types (Map <String, String>) in UML (or can I do
> so only in OCL)?
|
|
|
|
|
Re: [newbie] Basic Types in UML [message #628447 is a reply to message #628435] |
Wed, 12 May 2010 10:32  |
Eclipse User |
|
|
|
thanks, now I know what you mean.
The reason I want (need) to use java maps (and probably other java classes), is because I need to be able to use some frameworks, for example (apache) commons chain, where I need the execute(Map) method.
My current solution is to create another model, where I create as primitive type Map (in package java.util), when I think about it, it might be the only possible way...
|
|
|
Powered by
FUDForum. Page generated in 0.12575 seconds