ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Chalko <n...@chalko.com>
Subject Re: DO NOT REPLY [Bug 9784] - BuildNumber task: make more extendable...
Date Thu, 13 Jun 2002 01:10:29 GMT

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:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message