File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes Inner Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Inner Class" Watch "Inner Class" New topic
Author

Inner Class

Gustavo Adolpho Bonesso
Ranch Hand

Joined: May 11, 2002
Posts: 103
Hi !
How can i represent an inner class in an UML diagram ?


Gustavo Adolpho Bonesso<br />SCJP1.4
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I'm quite sure this has been asked before multiple times. Maybe you should do a search.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

It is mentioned in UML for Java by Robert c Martin (a book that I won )


Groovy
Matt R. Hansen
Ranch Hand

Joined: Sep 05, 2001
Posts: 71
UML diagrams preferably should not be language specific. However, inner classes are java specific. Also, inner classes are usually private. In which case, you would not want to display your inner class at all.
If you do need to display this inner class, you can extend the standard. The recommended way of doing this is to have a legend.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Matt R. Hansen:
UML diagrams preferably should not be language specific.

Unless you want to depict an imagined or existing implementation.
Also, inner classes are usually private. In which case, you would not want to display your inner class at all.

You can't think of a case where you would want to depict a private inner class?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
jQuery in Action, 2nd edition
 
subject: Inner Class
 
Similar Threads
Passing an object to a method.
Private
Inner Classes
Question in K&B Book - protected class
Inner Classes