On Fri, Nov 20, 2009 at 03:54:45PM -0800, Mike Hinchey wrote: >It's the . special form that makes the difference. In (. System >(getProperty)), the dot interprets System as a class and looks for a static >method (at read/compile time). With (identity System), System resolves to a >value, a Class object, returned by identity, then your outside dot looks for >a getProperty instance method on that object(fallback to reflection, which >fails) - it's like writing System.class.getProperty in java. There is no >syntax for clojure to lookup a static method on a dynamically resolved class >object because that is inherently reflection - dot is not about reflection, >though it will do it as a last resort.
So, if I've acquired a dynamically resolved class and want to invoke a static method, is my only choice to manually use reflection? David -- 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
