Not quite; fields without an access modifier are package-private. That means that code in classes in the same package (here, `clojure.lang`) can access such fields without any issue.
The distinction is without a difference for you here, of course — especially since Clojure treats all package-private and protected fields as private (modulo the various reflection-wrapping accessor fns out there). - Chas On Sep 18, 2011, at 12:54 PM, Brent Millare wrote: > Figured it out, those fields are private. Just reading the source code > I didn't realize if you don't declare it public, it defaults to > private. Shows how much I know about java syntax... > > -Brent > > On Sep 18, 10:22 am, Brent Millare <[email protected]> wrote: >> Using 1.3.0-RC0 >> I can't seem to access clojure.lang.DynamicClassLoader's public static >> fields. Is there something else preventing me from doing this? >> >> ;user=> clojure.lang.DynamicClassLoader/classCache >> CompilerException java.lang.RuntimeException: Unable to find static >> field: classCache in class clojure.lang.DynamicClassLoader, compiling: >> (NO_SOURCE_PATH:1) >> ;user=> clojure.lang.DynamicClassLoader/rq >> CompilerException java.lang.RuntimeException: Unable to find static >> field: rq in class clojure.lang.DynamicClassLoader, compiling: >> (NO_SOURCE_PATH:1) > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
