All this talk of interfaces, pluggability, and conditional tasks..... :)))
Magesh Umasankar wrote:
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
------------------------------------------------------------------------
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
