Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class relationship

 
Yi Meng
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Can anyone comments on this diagram in terms of correctness and clarity?
key point:
is TopLevel Nested Class(static nested class) belong to the group TopLevel Class?
or
A top level class is a class this is not a nested class. is it true?
 
Alton Hernandez
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is how I would classify them:

- Top-Level Class:
--- Nested Class
------- Member Class:
---------- Static Member Class
---------- Non-static Member Class
------- Inner Class
---------- Non-static Member Class
---------- Local Class
---------- Anonymous Class

[ June 19, 2003: Message edited by: Alton Hernandez ]
[ June 19, 2003: Message edited by: Alton Hernandez ]
 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone comments on this diagram in terms of correctness and clarity?

Yi Meng, static nested classes are always *member* classes. Can you show that in your diagram?
is TopLevel Nested Class(static nested class) belong to the group TopLevel Class?

top-level nested is not defined in the second edition of the JLS. A static class is a nested class that is not an inner class, as you have shown it.
A top level class is a class this is not a nested class. is it true?
Yes, that is the way it is defined in the JLS.
I draw a hierarchy, but exclude the word inner class. I use only all-classes, top-level, nested, member, static, non-static, local, and anonymous. Then I encircle those that are also inner classes.
[ June 19, 2003: Message edited by: Marlene Miller ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic