Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Inner Class

 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do I represent inner class in class diagram
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
reply
    Bookmark Topic Watch Topic
  • New Topic