(defn my-window [] (proxy [Window] [])) should do the trick
Proxy takes a vector of implemented interfaces and at most one superclass (in your case, Window), and then a second vector of arguments to pass to the superclass constructor (in your case, an empty vector) and then a series of methods implemented/overridden on the parent class/interfaces -- in your case there's none of those. My understanding is that proxy is not quite as performant as reify/defrecord, but it's the only game in town if you actually want to subclass something. Hope this helps =) On Fri Jan 30 2015 at 3:05:11 PM coco <clasesparticulares...@gmail.com> wrote: > Hi everybody, I need implement this java code in clojure > > public class MyWindow extends Window > { > public MyWindow() > { > super("My Window!"); > } > } > > MyWindow myWindow = new MyWindow(); > > > unfortunately the clojure documentation for generate classes is not so > complete or straightforward for my understand...must I use gen-class or can > I use defrecord for this task?...how can I call super class > constructors??... > > thanks > > -- > 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 > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.