Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Primitive Types reused in UML
Primitive Types reused in UML [message #476941] Sat, 16 February 2008 22:18 Go to next message
kevin is currently offline kevinFriend
Messages: 22
Registered: July 2009
Junior Member
Hi,

I imported UMLResource.UML_PRIMITIVE_TYPES_LIBRARY_URI and tried to get
"int". It gave a null pointer. The "int" is declared als "Integer" in
it. There are only four primitive types "Integer", "Boolean", "String"
and "Unlimited". How about others like "Double" or "Char"? I also need a
"byte" of Java.

Any solutions are welcome!

Zengyu
Re: Primitive Types reused in UML [message #476942 is a reply to message #476941] Sat, 16 February 2008 22:57 Go to previous messageGo to next message
Dave Carlson is currently offline Dave CarlsonFriend
Messages: 402
Registered: July 2009
Senior Member
Hi,
You should use the JAVA_PRIMITIVE_TYPES_LIBRARY_URI that is also declared
in UMLResource. It contains all Java primitives, but will have 'double'
instead of Double, as the latter is not a primitive type in Java.

The UML built-in primitive types defined in the UML spec are very limited
(as you observed). It is expected that other libraries are used, depending
on your purpose and platform.

Regards,
Dave Carlson

"Zengyu Lu" <sizeluuu@gmail.com> wrote in message
news:fp7nct$dqa$1@build.eclipse.org...
> Hi,
>
> I imported UMLResource.UML_PRIMITIVE_TYPES_LIBRARY_URI and tried to get
> "int". It gave a null pointer. The "int" is declared als "Integer" in
> it. There are only four primitive types "Integer", "Boolean", "String"
> and "Unlimited". How about others like "Double" or "Char"? I also need a
> "byte" of Java.
>
> Any solutions are welcome!
>
> Zengyu
Re: Primitive Types reused in UML [message #476943 is a reply to message #476942] Sat, 16 February 2008 23:38 Go to previous message
kevin is currently offline kevinFriend
Messages: 22
Registered: July 2009
Junior Member
Thanks Dave!



Dave Carlson 写道:
> Hi,
> You should use the JAVA_PRIMITIVE_TYPES_LIBRARY_URI that is also declared
> in UMLResource. It contains all Java primitives, but will have 'double'
> instead of Double, as the latter is not a primitive type in Java.
>
> The UML built-in primitive types defined in the UML spec are very limited
> (as you observed). It is expected that other libraries are used, depending
> on your purpose and platform.
>
> Regards,
> Dave Carlson
>
> "Zengyu Lu" <sizeluuu@gmail.com> wrote in message
> news:fp7nct$dqa$1@build.eclipse.org...
>> Hi,
>>
>> I imported UMLResource.UML_PRIMITIVE_TYPES_LIBRARY_URI and tried to get
>> "int". It gave a null pointer. The "int" is declared als "Integer" in
>> it. There are only four primitive types "Integer", "Boolean", "String"
>> and "Unlimited". How about others like "Double" or "Char"? I also need a
>> "byte" of Java.
>>
>> Any solutions are welcome!
>>
>> Zengyu
>
>
Re: Primitive Types reused in UML [message #626041 is a reply to message #476941] Sat, 16 February 2008 22:57 Go to previous message
Dave Carlson is currently offline Dave CarlsonFriend
Messages: 402
Registered: July 2009
Senior Member
Hi,
You should use the JAVA_PRIMITIVE_TYPES_LIBRARY_URI that is also declared
in UMLResource. It contains all Java primitives, but will have 'double'
instead of Double, as the latter is not a primitive type in Java.

The UML built-in primitive types defined in the UML spec are very limited
(as you observed). It is expected that other libraries are used, depending
on your purpose and platform.

Regards,
Dave Carlson

"Zengyu Lu" <sizeluuu@gmail.com> wrote in message
news:fp7nct$dqa$1@build.eclipse.org...
> Hi,
>
> I imported UMLResource.UML_PRIMITIVE_TYPES_LIBRARY_URI and tried to get
> "int". It gave a null pointer. The "int" is declared als "Integer" in
> it. There are only four primitive types "Integer", "Boolean", "String"
> and "Unlimited". How about others like "Double" or "Char"? I also need a
> "byte" of Java.
>
> Any solutions are welcome!
>
> Zengyu
Re: Primitive Types reused in UML [message #626042 is a reply to message #476942] Sat, 16 February 2008 23:38 Go to previous message
kevin is currently offline kevinFriend
Messages: 22
Registered: July 2009
Junior Member
Thanks Dave!



Dave Carlson 写道:
> Hi,
> You should use the JAVA_PRIMITIVE_TYPES_LIBRARY_URI that is also declared
> in UMLResource. It contains all Java primitives, but will have 'double'
> instead of Double, as the latter is not a primitive type in Java.
>
> The UML built-in primitive types defined in the UML spec are very limited
> (as you observed). It is expected that other libraries are used, depending
> on your purpose and platform.
>
> Regards,
> Dave Carlson
>
> "Zengyu Lu" <sizeluuu@gmail.com> wrote in message
> news:fp7nct$dqa$1@build.eclipse.org...
>> Hi,
>>
>> I imported UMLResource.UML_PRIMITIVE_TYPES_LIBRARY_URI and tried to get
>> "int". It gave a null pointer. The "int" is declared als "Integer" in
>> it. There are only four primitive types "Integer", "Boolean", "String"
>> and "Unlimited". How about others like "Double" or "Char"? I also need a
>> "byte" of Java.
>>
>> Any solutions are welcome!
>>
>> Zengyu
>
>
Previous Topic:Primitive Types reused in UML
Next Topic:Uni / Bi Directional Associations 3x different
Goto Forum:
  


Current Time: Fri Apr 26 16:33:47 GMT 2024

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

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

Back to the top