This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes OO, Patterns, UML and Refactoring and the fly likes Nested Classes in UML 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 "Nested Classes in UML" Watch "Nested Classes in UML" New topic
Author

Nested Classes in UML

Gustavo Adolpho Bonesso
Ranch Hand

Joined: May 11, 2002
Posts: 103
How to represent a Nested Class in UML ?


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

Joined: Jan 23, 2002
Posts: 11962
    
    5
The last time I needed to draw an inner class into a class diagram (which was a long time ago), I ended up using the same class notation for both inner and regular classes. If the inner class is non-static, you can associate it to the outer class using a composition. Otherwise, I would just rely on the name ("MyOuter.MyInner") to communicate my intention.
However, I would be interested to know what others think about this as I really didn't do much research on existing practices at the time.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Gustavo Adolpho Bonesso
Ranch Hand

Joined: May 11, 2002
Posts: 103
Thank you, Lasse, i like the composition aproach to do the job...
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

Does UML 2.0 talk about nested classes?


Groovy
 
 
subject: Nested Classes in UML
 
Similar Threads
defualt multiplicity is 1 or 1..many?
WA #1.....word association
About the book
Best IBM cert ?
Poseidon for UML