It's easy enough to access an inner class in general. From a different class, you can refer to OuterClass.InnerClass. Easy as that.
However, I'm using an enum inner class. OuterClass.InnerEnumClass.InnerEnumMember doesn't work. Neither does Outerclass.InnerEnumMember. What's the syntax, then?
Let's use this as an extremely oversimplified example;
In this example, references FROM the outer class (dir = Direction.LEFT) work just fine. However, when I need to access it from another class, I cannot seem to use the enum (new OuterClass(Direction.RIGHT)). What's the proper syntax?
Nested enums are implicitly static. Therefore the word "inner" does not apply, by definition. And therefore you can't access them using an instance of the outer class - instead, use the slightly simpler syntax like this:
"I'm not back." - Bill Harding, Twister
Hey, sticks and stones baby. And maybe a wee mention of my stuff: