Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to show ArrayList as type in UML class diagram
How to show ArrayList as type in UML class diagram [message #1773365] Tue, 26 September 2017 20:49 Go to next message
Marija Matic is currently offline Marija MaticFriend
Messages: 9
Registered: August 2017
Junior Member
Hi, I need to get Java code reverse engineering. Some classes have ArrayList of some objects. How to show ArrayList in UML class diagram? I want to show attribute as :
columnDefinitions: ArrayList<String>
indexes: ArrayList<String>
but it is shown like on the photo in attachemnt.
  • Attachment: create.JPG
    (Size: 22.57KB, Downloaded 173 times)
Re: How to show ArrayList as type in UML class diagram [message #1774838 is a reply to message #1773365] Fri, 20 October 2017 12:30 Go to previous message
Ansgar Radermacher is currently offline Ansgar RadermacherFriend
Messages: 159
Registered: March 2011
Location: Paris Saclay, France
Senior Member
If your attributes are typed as ArrayList<String> in Java, you need to type them in the same way in UML. This means that you need to create a class ArrayList with a template signature (e.g. with a datatype parameter "T"). Then create a class that you could call ArrayList<String> which has a binding relationship (binding T to String) with class ArrayList.

The handling of templates is quite tedious in UML, compared to textual languages in which bound classes can be declared "on the fly" (i.e. while typing a attribute, parameter or variable).
Previous Topic:Multiplicities and Navigability package diagram sysml
Next Topic:@admin plz delete this
Goto Forum:

Current Time: Sun Sep 23 01:01:36 GMT 2018

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

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

Back to the top