On Tue, Dec 30, 2008 at 11:52 AM, CuppoJava <patrickli_2...@hotmail.com> wrote: > > Ah sorry I missed that. > > However, you accomplished this only because there exists a constructor > in Thread that takes a String name argument. > As a general case, it's not usually that convenient... > > ie. > > public class MyThread extends Thread{ > public MyThread(){ > setName("This is my thread"); > setPropertyA("bla bla bla"); > setPropertyB("bla bla bla"); > etc... > } > }
Seems like that class has a rather unfortunate API. :-) As far as I know, this is not currently possible with gen-class. Seems like you'd need some kind of post-constructor hook, provided just to deal with mutable state of the base class. I wonder if Rich would accept a patch providing an :after-ctor option to gen-class. --Chouser --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---