Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 49631 invoked from network); 22 Aug 2007 17:15:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Aug 2007 17:15:25 -0000 Received: (qmail 84130 invoked by uid 500); 22 Aug 2007 17:15:22 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 84023 invoked by uid 500); 22 Aug 2007 17:15:21 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 84012 invoked by uid 99); 22 Aug 2007 17:15:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Aug 2007 10:15:21 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [206.190.58.164] (HELO web55115.mail.re4.yahoo.com) (206.190.58.164) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 22 Aug 2007 17:15:56 +0000 Received: (qmail 97472 invoked by uid 60001); 22 Aug 2007 17:14:57 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=YHW28x6Pmvjqkwi9AmUfXpVoYStwvIdpAmC5nhW908M5XoeWlcqaJ9nP11s7XyxyPN/yJRWWD9EYKwmaCQYK97xtRs7Rf9IZqJvvIz2kV8FWAegbTE1k3YlcsJ+BI7EyMsEvRrxP10E8F4YBHmqgDeWAuQpvxbG2MgnyFmIULfg=; X-YMail-OSG: NEXDnL8VM1lIT7DDer.Vob2pNAM6dhi7uL5GKiiC45qdtuoeAj6ajG2F8vxUvIYplh2p4dIzQOTemkiij0NMrQL3salbaYGZMo6tbgmNLIAELvwoR11cX75.LfgryA-- Received: from [66.10.233.130] by web55115.mail.re4.yahoo.com via HTTP; Wed, 22 Aug 2007 10:14:57 PDT Date: Wed, 22 Aug 2007 10:14:57 -0700 (PDT) From: Matt Benson Subject: Re: svn commit: r568511 - /ant/core/trunk/src/main/org/apache/tools/ant/PropertyHelper.java To: Ant Developers List In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <380189.96721.qm@web55115.mail.re4.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --- Peter Reilly wrote: > On 8/22/07, Matt Benson > wrote: > > > > --- Peter Reilly > wrote: > > > > > On 8/22/07, Matt Benson > > > wrote: > > > > [SNIP] > > > > though I'd still like an opinion on the proxy > > > > mechanism I suggested for delegate > recursion... > > > :) > > > > > > I did not reply because I did not understand the > > > proposal :-) > > > > > [SNIP] > > > > Okay--when a PH calls a delegate it passes itself > down > > in case the delegate needs to make calls against > the > > PH. This would imply a sort of property decorator > > pattern. Anyway, I think in this case a delegate > > calling PH.get() might need to be able to discern > the > > difference between NullReturn and no-such-property > > null. The first thing that occurred to me was > that > > the PH could pass the delegate not itself, but a > sort > > of proxy to itself that would fail to decode > > NullResult but instead return it to the delegate > > unharmed so that the delegate could handle the > > difference between them. Since this would need to > be > > passed down over and over again I thought it could > > live as a member of each PropertyHelper instance. > > I think that I sort of follow, however I do not > think that > it can be a member of the PH instance since PH needs > to be ThreadSafe. > > My idea was that the nullreturn was a message to PH > (i.e. > end the chain) and not to the PH delegates. > > Perhaps a new method PH.evalulateProperty(project, > name) (like > PH.getProperty(project, name), > could return a PHResultObject - > the tostring of which would be the current > stringy form - ie > ${xx} (a delegate could change this to a "null" > and the getObject() > would return null or the object > if present. setX(String, File etc) would be > called with the > toString() method and setX(Object) would be > called with the > getObject() method. > > If a delegate can resolve a property, it can > return a PHResultObject > if it wants to do something like handing nulls. > > My mind is swimming, and I don't really have the time to try and make complete sense of all this right now. :( I would say we could just leave the issue until it causes a problem, but I'd rather have as many issues as possible ironed out before 1.8.0 is released or we'll have further API ugliness. But we've got some time until then. -Matt > Peter > > > > > > Does that make sense? > > > > -Matt > > > > > > > > > ____________________________________________________________________________________ > > Got a little couch potato? > > Check out fun summer activities for kids. > > > http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > dev-unsubscribe@ant.apache.org > > For additional commands, e-mail: > dev-help@ant.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > dev-unsubscribe@ant.apache.org > For additional commands, e-mail: > dev-help@ant.apache.org > > ____________________________________________________________________________________ Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center. http://autos.yahoo.com/green_center/ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org