On Dec 11, 12:44 pm, Keith Irwin <keith.ir...@gmail.com> wrote: > On Fri, Dec 11, 2009 at 12:27 PM, Keith Irwin <keith.ir...@gmail.com> wrote: > > public abstract class Foo { > > > private Map stuff; > > > private void initStuff() { > > > stuff = new HashMap(); > > stuff.put("a", new Object()); > > addStuff(stuff); > > } > > > protected void abstract addStuff(Map stuff); > > } > > In Clojure, I construct: > > > (proxy [Foo] [] > > (addStuff [stuff] (println "yay!"))) > > I should amend this to say that I get an AbstractMethodError when the > (proxy ...) is evaluted. I'm running the code as a script. > > Keith
Hmm, this works fine for me: user=> (def mymap (proxy [java.util.AbstractMap] [] (entrySet [] (println "yay!")))) #'user/mymap user=> (.entrySet mymap) yay! nil -- 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