I haven't had time to digest this whole thread and this solution is a bit 
off the wall... but do you really have a requirement to generate Java source 
? Would Java bytecode not suffice ? 

If you were generating classes/interfaces you could ignore all the issues 
with Java syntax and just write a clojure macro to generate a 
definterface/type, then compile that.

If you really wanted source code, you could then run a decompiler on it - 
I've done this before on a project, that used byte code emission, so that we 
could demonstrate 100% code coverage :-) - I'm not sure if Clojure generates 
bytecode that cannot be decompiled into Java - but for interfaces and enums 
it should not be an issue.

I'm not aware of Clojure support for generating enums, but I suspect that it 
would be considerably less work and more fun to extend Clojure's byte code 
emmission code to handle this. Enums have the added benefit that they would 
be really simple to emit and decompile reliably.

Hope this is not too off the wall !

Jules



-- 
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

Reply via email to