aspose 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
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Inner Class" Watch "Inner Class" New topic
Author

Inner Class

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
How do I represent inner class in class diagram
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
You don't. I mean, there is no standard notation for an inner class, a concept which is very much language specific. (unless UML 2.0 has introduced such a thing)
Here's what I suggest:
1) Represent inner classes as regular classes if they're public
2) Don't represent inner classes if they're private
3) Represent even private inner classes as regular classes if the scope of the particular diagram is just to visualize the internals of the top-level class


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

Joined: Feb 27, 2002
Posts: 8919

UML in java book uses circle with a plus symbol to represent inner class. Is it a standard?
[ November 14, 2003: Message edited by: Pradeep Bhat ]

Groovy
william kane
Ranch Hand

Joined: Nov 21, 2000
Posts: 260
Originally posted by Lasse Koskela:
You don't. I mean, there is no standard notation for an inner class, a concept which is very much language specific. (unless UML 2.0 has introduced such a thing)
Here's what I suggest:
1) Represent inner classes as regular classes if they're public
2) Don't represent inner classes if they're private
3) Represent even private inner classes as regular classes if the scope of the particular diagram is just to visualize the internals of the top-level class

Yes if your inner class is public you can name it outerclass$inner to state the fact that its an inner class of class "outer".
http://www.flex-compiler.csail.mit.edu/jdk/guide/innerclasses/spec/innerclasses.doc7.html
But again that wont be a standard


Help me!Help you!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inner Class