Erik Hatcher wrote:

This is slick, but why not just have a templated Java file that you use a
filtered <copy> to replace the pieces?


Hmm. good point. I guess I could. The java date might be a little complicated.
I did it mostly because I had already wrote a class generator for other things (LookUp Tables, static references to resource names. etc)
I is also "simpler" for use by the less ant literate. (Trust me some people are "scared" by ant.)


btw I have factored out the generic class generation task and will submit when I have cleaned it up and added some docs, and changed the licsense.
.
see http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/chalktools/chalktools/src/com/chalko/tools/ant/ClassGenerator.java?rev=1.2&content-type=text/vnd.viewcvs-markup


I also have an idea for a MixIn task.

given two classes

public class Foo { public void me() {};}
public class Bar { public void mine() {};}

<mixin extend="Foo" mixin="Bar" />

would genreate

public abstract FooBar extends Foo {
   protected final Bar bar = new Bar();
   public void mine() {
       bar.mine();
   }
}

I need this becuse I have a class that needs both JDBCTask and ClassGeneratorTask to generate Classes from Tables.


btw
as part of the ClassGeneratorTask I made a IndentWritter (see http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/chalktools/chalktools/src/com/chalko/tools/utils/IndentWriter.java?rev=1.1&content-type=text/vnd.viewcvs-markup )
I would like to donate it to commons, but I don't see where to put it.


R,
Nick







--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



Reply via email to