2

I just want to know how can I add a Type (for example String) to a Operation in Papyrus Class diagram.

Because if I drag a Operation form the palette to the Classe diagram, the Operation will be without any Return Type. (I want to show for example the Function String getName() in Class Diagram)

Thanks a lot

Regards

NarsiL
  • 21
  • 1
  • 2
  • try owned Parameter as you can see http://postimg.org/image/dsilpmfdb/ and then press + to view detailed properties. Hope it help you:) – user2019510 Jul 16 '13 at 12:32

1 Answers1

3

To clarify what user2019510 said:

An Owned Parameter can be:

  • Method arguments/parameters for the method (e.g. the name in aPerson.setName(String name)) You can name these and/or set the type.
  • Return values (as for int anArray.size()).

The "Direction" specifies its intent: is it an input parameter, an output parameter, an "inout" parameter (pass it in, get a different result out -- very useful for Fortran), or a return value.

You can name the parameters or omit the name. For return values, naming the Owned Parameter doesn't make sense to me, so I omit its name.

Hope this helps somebody!

jvriesem
  • 1,859
  • 3
  • 18
  • 40