ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@apache.org>
Subject [PATCH] Adding Dynamic elements for the n'th time
Date Tue, 26 Nov 2002 20:54:32 GMT
Hi,

This is basically a modification of Conor's patch
to enhance the Introspection capabilities. See:

http://marc.theaimsgroup.com/?l=ant-dev&m=100591826612807&w=2

The difference is that my patch looks for methods whose
parameter class type is assignable from the nested element's
class type.

Let us say we have the following mappings:
TagDefA->ClassA
TagDefB->ClassB

ClassA implements Interface1
ClassB implements Interface1

Currently, if we want these as nested elements, 
we would have to define

addTagDefA(ClassA)
addTagDefB(ClassB)

With this patch, if you define, 

addInterface1(Interface1)

it would be good enough and will be called when
you have a nested element like <tagdefa .../> or 
<tagdefb.../> and no equivalent addTagDef methods.

So, Where does this apply?  It applies to
<condition>, <filterchain>, etc. and of course the
<fileset> issue that Conor originally solved.

In my patch, I have minimally shown how this
is applied to ConditionBase.

This patch depends upon my earlier patch Project.java
because when Condition is initialized, it expects
its nested elements to have been already initialized.
If they are not, then it balks.

Cheers,
Magesh


Mime
View raw message