Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Papyrus class diagram - expression methods(How to create methods with expression as return type)
Papyrus class diagram - expression methods [message #1770967] Sun, 20 August 2017 05:22 Go to next message
patricia narvasa is currently offline patricia narvasaFriend
Messages: 2
Registered: August 2017
Junior Member
Hi,

Can anyone please help me how can I create a class diagram with expression as return type. Please see my example for more details.

*I wanted to have a UML class diagram representation of this method

public Int calculateTotalSale(int num1, int num2)
{

return num1 + num2;

}

can anyone help? thank you
Re: Papyrus class diagram - expression methods [message #1771163 is a reply to message #1770967] Tue, 22 August 2017 15:11 Go to previous messageGo to next message
Ansgar Radermacher is currently offline Ansgar RadermacherFriend
Messages: 461
Registered: March 2011
Location: Paris Saclay, France
Senior Member
You can create an opaque behavior that consists of "return num1+num2;". You can choose for instance Java or C++ as language for this behavior. You can link the UML operation with this method (behavior), but it is not possible to see the implementation within the class diagram.

Papyrus SW designer has some example of classes with opaque behaviors (update-site: http://download.eclipse.org/modeling/mdt/papyrus/components/designer/)
Re: Papyrus class diagram - expression methods [message #1771282 is a reply to message #1771163] Wed, 23 August 2017 16:21 Go to previous message
patricia narvasa is currently offline patricia narvasaFriend
Messages: 2
Registered: August 2017
Junior Member
Thank you Ansgar
Previous Topic:Migration from Neon to Oxygen?
Next Topic:C++ reverse engineer howto
Goto Forum:
  


Current Time: Fri Apr 26 18:10:23 GMT 2024

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

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

Back to the top