generating java classes at runtime

2009-06-18 Thread rdsr
Hi all, I had a bit of requirement, which necessitate generation of java classes at runtime by reading some xml data and adding them to the classpath . Since I was learing clojure, I thought this could help. Can you guys provide me with some pointers as to how to go about it. regards, rdsr

generating java classes at runtime

2009-06-18 Thread Ratandeep Ratti
Hi all, I had a bit of requirement, which necessitate generation of java classes at runtime by reading some xml data and adding them to the classpath . Since I was learing clojure, I thought this could help. Can you guys provide me with some pointers as to how to go about it. regards, rdsr

Re: generating java classes at runtime

2009-06-18 Thread hoeck
Hi, if your generated classes implement a varying but finite set of interfaces, or extend a given class, then using the proxy macro would be the easiest way to generate them at runtime: http://clojure.org/java_interop#toc26 or type (doc proxy) at the commandline. If your generated classes exten

Re: generating java classes at runtime

2009-06-24 Thread RD
I wont be extending classes or interface since I have to generate classes on the fly, reading some arbitrary xml schemas at runtime. I'm thinking of just parsing the xml schema in clojure and generating a list (which would contain a text representation of how I would generate a normal java cl

Re: generating java classes at runtime

2009-06-24 Thread chris
Yes that is feasible. You might consider just writing out a file and calling "load-file". Then you have an artifact should you wish to debug later. This will do the necessary compilation step before giving you access to any contents. Chris On Jun 24, 9:35 am, RD wrote: > I wont be extending c