This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I think from reading your post that your specific question is
"I am not sure how to set the return type using Jworks"
I would suspect that JWorks would have a tutorial or documentation that would aid with this. I think their site would be a good place to start. I briefly googled JWorks but I am getting a number of hits and I don't really know what it is that you are using so if you need more help then I would suggest that you post a link to the specific site for the tool that you are using.