Parameterized class as an operation parameter type [message #1061870] |
Tue, 04 June 2013 08:54  |
Eclipse User |
|
|
|
Hi,
I'm currently working on a UML class diagram to model a typical business application (sort of a customer relationship management system).
Thus I need to define a template's operation with a parameter, whose type is a parameterized interface (List<E>, where E is the templates parameter). To clarify my class structure:
class List<class T>
interface JpaRepository<class E>
List<E> findAll()
void delete(E element)
etc...
I know how to define the delete function in this case, I can apply E as a parameter. But I don't know how to define the findAll() operation, as I have not yet found a way to use parameterized classes as operation parameter types in Papyrus. I have heard, that UML provides parameterized classes, but is it possible to use them with Papyrus? I do not want to create a new template bound class for each usage of List<T>!
Greetings,
Martin Puffe
[Updated on: Tue, 04 June 2013 09:49] by Moderator
|
|
|
|
Re: Parameterized class as an operation parameter type [message #1062006 is a reply to message #1061897] |
Wed, 05 June 2013 07:41  |
Eclipse User |
|
|
|
In the context of UML I mean a template, but the parameter needs to be specified (E).
How can I bind a nedsted class to the template using Papyrus? I haven't found a way yet, since there's no place to drop the TemplateBinding edge?
Edit: Using the nested calssifier compartment I have found a way to apply a template binding on a nested class. But I cannot use the template parameter of the class, which holds my nested class to substitute the List formal template parameter with an actual parameter. What am I doing wrong?
[Updated on: Wed, 05 June 2013 07:52] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03548 seconds