On Mon, Dec 28, 2009 at 02:50:59PM -0800, Mark Tomko wrote:
>This, however, does not work:
>
>(ns org.tomko.konkordans.analysis
>  (:import
>    (org.tomko.konkordans NestedStatics)))
>
>(def foo NestedStatics$LevelOne$LevelTwo/NO)

The class is called NestedStatics$LevelOne$LevelTwo, so you would have
to import that if you wanted to use it.  As far as the JVM is
concerned, NestedStatics, NestedStatics$LevelOne and
NestedStatics$LevelOne$LevelTwo are just three independent classes.

Java added nested classes, but didn't really add them to the JVM.  It
just makes longer class names using the '$'.

It's probably safe to rely on this behavior, since there is plenty of
code that depends upon it working this way.

David

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to