ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <>
Subject Re: Roles (was: antlib)
Date Fri, 02 May 2003 09:48:15 GMT
I have done a little further work on my patch
to allow nested elements to have Project type
as a constructor.

If the object contains both add<Element>() and create<Element>(),
the add<Element>() method is used.

    <typedef myfileset mypath anttest etc ..>
    <copy todir="output">
      <fileset ant-type="myfileset" dir="src"
                  newattribute="MyFileSet attribute"/>

      <path ant-type="mypath" path="build.xml"
                newattribute="MyPath attribute"/>

I will upload the modified  patch over the weekend.


On Friday 02 May 2003 10:07, Stefan Bodewig wrote:
> On Wed, 30 Apr 2003, Costin Manolache <> wrote:
> > Can you explain again what's wrong with create ? I think I missed
> > it...
> You can't pass in a subclass of the type returned by the createXYZ
> method as the object creation happens inside the task.  If you want to
> use a subclass of Path named mypath, you can't use it in tasks that
> use createPath for the nested <path> element.
> > My understanding was that whatever is in use today will continue to
> > work the same, we just add a new pattern at the end.
> Yes, with the caveat that polymorphism doesn't work for the createXYZ
> case.
> Stefan
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message