On Thu, 9 Jul 2009 11:27:23 -0400, "Scott A. Hightower"
<VastError@SpamGourmet.com> wrote, quoted or indirectly quoted someone
who said :
An enum is implicitly static, but I found nothing special about the access
modifiers (public, protected, private, default) in the language spec as
regards enums.
In some ways the enum constants are subclasses of the enum as a whole.
They can override methods of the enum as a whole. You can have
abstract methods in the enum as a whole implemented by the enum
constants.
In other ways they are like inner classes.
You can cheat by disassembling and see how enums are implemented, but
I have never sat down and figured out if scope rules follow that
implementation. see http://mindprod.com/jgloss/enum.html
The scope rules should exist independent of that bit of bailing wire.
enclosing class. If a constant does not have an enum body then the constant
is implemented as an instance of the enclosing enum itself. The JLS is very
detailed on this.