http://argouml.tigris.org/issues/show_bug.cgi?id=6421
Issue #|6421
Summary|Support interfaces and generics when generating multip
|licity code
Component|argouml
Version|0.33.7
Platform|Macintosh
URL|
OS/Version|All
Status|NEW
Status whiteboard|
Keywords|
Resolution|
Issue type|DEFECT
Priority|P3
Subcomponent|CodeGeneration and ReverseEngineering
Assigned to|thn
Reported by|phidias
------- Additional comments from [email protected] Thu Mar 29 08:09:44 -0700 2012 -------
When I specify the multiplicity between two classes, code gen creates a public untyped Vector in the
owning class. Let's say that you have a class like Department. This class has multiple Employees.
Department <>----- [1..*]Employee
When I name the association to "employeeList", and add some documentation, and look at the source
for the Department in the Source tab, I see this:
/**
* A list of employees in the Department.
* @element-type Employee
*/
public Vector employeeList
Ideally, I'd like to see
private List<Employee> employeeList;
If the user wanted the employee list initialized to a concrete class they would be able to do so after code
generation. Or this might be a preference that the user would specify. In that case the results would
look more like this:
private List<Employee> employeeList = new Vector<Employee>();
or
private List<Employee> employeeList = new ArrayList<Employee>();
depending on what they'd set the preference to.
Also, ff I select the endpoint within Department, and set the visibility to Private, the code still shows up
as public.
This issue effects the Class Diagram, Code Gen and the Properties panel.
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=448&dsMessageId=2942060
To unsubscribe from this list, e-mail: [[email protected]].
Please do not reply to this mail. Instead, add your comments in the issue.
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.