From levylambert@tiscali-dsl.de Thu May 22 10:17:16 2003 Return-Path: Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Delivered-To: mailing list dev@ant.apache.org Received: (qmail 25888 invoked from network); 22 May 2003 10:17:16 -0000 Received: from relay1.tiscali.de (HELO webmail.tiscali.de) (62.27.55.1) by daedalus.apache.org with SMTP; 22 May 2003 10:17:16 -0000 Received: from DJ0X820J (80.128.233.59) by webmail.tiscali.de (6.7.008) id 3EC9F8D0001686B8 for dev@ant.apache.org; Thu, 22 May 2003 12:00:26 +0200 Message-ID: <00d901c3204b$709bf190$030200c0@DJ0X820J> From: "Antoine Levy-Lambert" To: "Ant Developers List" References: <747F247264ECE34CA60E323FEF0CCC0C0F50FE@london.cellectivity.com><200305221437.43765.conor@cortexebusiness.com.au><008401c32045$b5619790$030200c0@DJ0X820J> Subject: Re: antlib Date: Thu, 22 May 2003 12:18:07 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Stefan Bodewig wrote : > With roles, would an arbitrary implementation of ShapeInterface that > was not bundled with the antlib and was not declared to be in role > shape be accepted as nested element in ? > > If the answer is yes, then roles would be optional and would mainly be > used to make things more explicit, right? This is fine with me. > > Stefan > It is perfectly possible to program ant so that roles are optional and just make things more explicit. Roles could be used to disambiguate situations where a component class implements several interfaces which have a meaning for ant, say Shape and Block for instance, and a task accepts both shapes and blocks as nested elements. I will gladly wait until the patches of Peter Reilly are committed before implementing roles. In this case, to fit to the wish of Costin to develop roles so that they exist also outside of antlibs, I would : 1 ) create a roledef task, 2 ) add an optional role attribute to typedef, 3 ) make changes in helper classes so that if a typedef has a role assigned to it, it is only accepted as a nested element in the add method taking the role interface as parameter. Antoine Antoine