ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <>
Subject Re: [PATCH] Adding Dynamic elements for the n'th time
Date Thu, 28 Nov 2002 17:35:54 GMT
----- Original Message ----- 
From: "Stefan Bodewig" <>

> On Wed, 27 Nov 2002, Magesh Umasankar <> wrote:
> > This, I think is a reasonable constraint if you plan
> > to be doing different things (obviously) in addSrc and
> > addClasspath.
> I disagree.  Just look into the current implementation of <javac>,
> there are several path structures supported via nested elements.

I don't see addXXXPath(...) methods in <javac>.  I
only see createXXXPath().  There are some setters,
of course, but that is beyond the scope of this patch.

> Inventing a Path subclass for all of them seems overkill.
I can rework the patch such that:
addClassPath(ClassPath) is searched for;
addClassPath(Path) is searched for;
addPath(Path) is searched for.

The second step above would behave somewhat like
the setter methods which recognize setClasspath(Path)

> And even then, take MyPath extends Src extends Path and addSrc(Src) as
> well as AddPath(Path) - what should <mypath> trigger?

Well, Conor's would have triggered addSrc, but in mine, 
either may be triggered, but mine recognizes interfaces
also, FWIW.  I can rework it as a hybrid of both patches so that 
both the class hierarchy as well as interfaces are recognized.

> I think we really need a way for the user to disambiguate the
> situation.
> One way is to say <path> when I want addPath and <src> when I want
> addSrc (and use an attribute to say it it a MyPath).  I think this
> might involve major changes in IntrospectionHelper.
> The other way is to say <mypath> and have an attribute that says "use
> this as path" or "use this as "src".  This also means big changes to
> IntrospectionHelper, but potentially smaller ones.

If MyPath extends from Src extends from Path,
I think we don't need to disambiguate the situation.
addSrc *should* be the chosen one in the absence of addMyPath.  
For example,

If SubSub extends Sub extends Base and you have
set(Sub) and set(Base), when invoking set(SubSubObj)
set(Sub) will get invoked.

> I'm just estimating here.
> Stefan


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

View raw message