ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: [VOTE] Promotion of FilterReaders proposal to main development tree.
Date Thu, 28 Feb 2002 04:56:11 GMT
On Wed, 27 Feb 2002, Magesh Umasankar wrote:

> > - Parametrizable/Parameter. Ant already have a clear ( and pretty good )
> > set of rules for setting properties in java objects, using introspection,
> > etc. There is no need to introduce this concept, using the same mechanism
> > as for tasks should be enough.
> I am not sure I follow:
> For a given declaration like the following,
> <filterreader ...>
>     <param.../>
> </filterreader>
> I am making use of Ant's introspection mechanism
> to add elements to antfilterreader.  However, I need
> to be able to propogate those parameters to the
> class that antfiltrerreader instantiates - for that
> I need Parameterizable.

Not if you first declare "striplinecomments" as a type, using
a typedef declaration ( or antlib ). 

The class would have to follow ant's patterns - i.e. have
addComment(), etc - like a task ( or a TaskAdapter-ed task ) would.

> > - AntFilterReader - I prefer a more generic mechanism. What it does is
> > 'wrap' a into an ant datatype. The same thing can
> >  be better achieved in a generic way - using a TypeAdapter ( similar
> > with TaskAdapter ). <antlib> proposal ( and my proposed refactoring
> > of Task/Type management ) would provide this - all you have to do
> > to add the filter is use a typedef ( and that'll take care of
> > automatic property setting using introspection - so no need for
> > Parameter ).
> _When_ <antlib> makes its way in, I will
> be one of the first to jump into its bandwagon...
> But till then, I don't want that to suspend
> progress on everything else.

Hopefully antlib and/or an equivalent will be in for ant1.5.

You're code is just implementing a particular case. If you 
don't want to wait for antlib, refactor your code to make 
it more generic and it'll be <antlib> :-)

Anyway, all you need is a small extension to Typedef, similar
with what Taskdef/TaskAdapter is doing. You could do it
without waiting for antlib. 

> > I'll add more comments as I read the code, but so far
> > filters/ are fine ( without Parametrizable ). If you agree
> > to use <antlib> or an extended <typdef>, most of what
> > you added in types/ will not be needed, and you can
> I will make use of it as soon as it gets
> accepted into the main tree.  Fair enough?

Ok with me.

> That is true.  This is available only to work around
> the limitations of the _current_ Ant1 model.

Fixing the limitation that makes the tricks required is 
quite simple - and it's not a limitation of the ant1
model, but something missing in the implementation.
TaskAdapter and Taskdef are already doing most
of what you need for tasks, and adding the ability
to fully control task/type creation is easy.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message