| Author |
Class relationship
|
Yi Meng
Ranch Hand
Joined: May 07, 2003
Posts: 270
|
|
 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?
|
Meng Yi
|
 |
Alton Hernandez
Ranch Hand
Joined: May 30, 2003
Posts: 443
|
|
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
Joined: Mar 05, 2003
Posts: 1391
|
|
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 ]
|
 |
 |
|
|
subject: Class relationship
|
|
|