OneStopFAQs.com - World's Largest Collection of Frequently Asked Questions
Saturday, August 30, 2014 Home| Ask Questions| About Us| Feedback| Contact Us|
 Common FAQs  
 Our Services  
FAQs PROGRAMMING LANGUAGES METHODOLOGY DETAILS
A D V E R T I S E M E N T


Question :
What are the plans to represent a Java throws signature element in a UML method signature and how should I represent a Java throws signature element in a UML method signature?
Category Methodology Interview Questions
Rating (0.0) By 0 users
Added on 4/11/2009
Views 97
Rate it!
Answers:

As far as official plans, you'll have to get word directly from someone on the UML 2.0 committee at the OMG - of which I am not (said with a sign of relief :-)

Looking at Grady's book (UML User's Guide pg 285) I see that exceptions are modeled as classes (because in Java they really are defined by classes). What you are really looking for is a way to visually represent a particular operation in an arbitrary class throwing that exception. In the user's guide it says that a <<send>> stereotyped dependency is drawn directly from the operation in the class compartment to a <<exception>> stereotyped class. Note that the depenency is drawn from the operation itself, not the boundary of the class (really hard to see in this ascii rendering i know).

-------------------------------------------
| <<interface>> |
| MyInterface |
| --------------------------------------- | |-----------------|
| | <<send>> | <<exception>> |
| +myMethod(myParam:Object) : Object - - -+- - - - - - - - - >| MyException |
| | -------------------
-------------------------------------------

On a side note, I was unable to find any references to the modeling of exceptions in the UML specification from the OMG. So this particular use of the stereotypes and notation might not be cleared with the OMG committee so far.

Unfortunately I don't know of any UML modeling tool (real tools not just free form drawing programs) that allow you to draw dependencies directly from an operation. So I think that the practical way to model especially important exception throwing is with a dependency from the class to the exception class, but with either tag values of the operations that throw it, or by naming the dependency with the list of operations that throw the exception.



If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in OneStopFAQs.com:-

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
    Inform me about updated answers to this question

       
    Related Questions
    View Answer
    Where can I find market statistics on Java and Java developers? Things like number of developers, various industry segments, Java usage growth projections, etc....
    View Answer
    Are there any open source/free UML tools for Java developers?
    View Answer
    How can I maintain a single instance of an object in an applet?
    View Answer
    What is the best way to generate a universally unique object ID? Do I need to use an external resource like a file or database, or can I do it all in memory?
    View Answer
    Is there some kind of Design pattern which would make it possible to use the Same code base in EJB and non EJB context?
    View Answer
    What is session facade?
    View Answer
    What are the four phases of RUP?
    View Answer
    What is AOP?
    View Answer
    How can I implement the MVC design pattern using JSP?
    View Answer

    Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

    Notify me when better answer is posted!
    Email:

    View ALL Methodology Interview Questions


    Sponsors  

    Google Search

    Google
    Business FAQs, Internet FAQs, Accounts FAQs, Computer FAQs, Insurance FAQs, Frequently Asked Questions & Related Pages


    Arts and Entertainment Frequently Asked Questions | Business Frequently Asked Questions | Computers Frequently Asked Questions | Programming Languages Frequently Asked Questions | Education Frequently Asked Questions | Electronic gadgets Frequently Asked Questions | Health Frequently Asked Questions | People and Relationships Frequently Asked Questions | Food and Cooking Frequently Asked Questions | History Politics and Society Frequently Asked Questions | Home, Farm and Garden Frequently Asked Questions | Insurance Frequently Asked Questions | Jobs & Careers Frequently Asked Questions | Law and Legal Issues Frequently Asked Questions | Money and Credit Frequently Asked Questions | Science and Technology Frequently Asked Questions | Religion and Spirituality Frequently Asked Questions | Shopping Frequently Asked Questions | Sports Frequently Asked Questions | Travels Frequently Asked Questions | Animal Life Frequently Asked Questions | Literature and Language Frequently Asked Questions | Vehicles Frequently Asked Questions | Plants and Trees Frequently Asked Questions | Miscellaneous Frequently Asked Questions | Software Testing Frequently Asked Questions | Electronics Frequently Asked Questions | Certification Frequently Asked Questions | Web Hosting Frequently Asked Questions | SAP Module Frequently Asked Questions | Database Frequently Asked Questions | Operating System Frequently Asked Questions | Soft Skills Frequently Asked Questions | Hobbies and Collectibles Frequently Asked Questions | Humour and Amusement Corner Frequently Asked Questions | Community life and Leisure Frequently Asked Questions | Street Care and Cleaning Frequently Asked Questions | Technology Frequently Asked Questions | Celebrities Frequently Asked Questions | India Information Frequently Asked Questions | Microsoft Frequently Asked Questions | Multimedia Frequently Asked Questions |
    Copyright © 2005-2014. One Stop FAQs.com. All rights reserved Privacy Policy | Terms and Conditions | About Us
    Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Cool Interview | Discussions World | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Indian Free Ads | Freshers & Experienced Jobs | New Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Web Hosting in India | Free SMS | Quick Site Kit | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Testing Interview Questions | Free Online Exam | The Galz | Fun & Entertainment | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World
    Page URL: http://www.onestopfaqs.com/faqs/22193/Default.asp
    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Greetings