Then how about using Containment instead of Inheritance? That way, you can
create a brand new instance of the Task you delegate to, and initialize it
to your heart's desire. Of course, it's more typing to you, if you want to
expose setters/adders/creaters of the contained task. And you need your own
execute() method... I'm assuming it's easy to create the task
programmatically, which I don't see why it shouldn't be given all the
reflection ANT is doing (and my experience hasking ANT 1.3 back then). FWIW,
--DD

 -----Original Message-----
From:   stephan beal [mailto:[EMAIL PROTECTED] 
Sent:   Tuesday, March 26, 2002 11:59 AM
To:     Ant Developers List
Subject:        Re: [Bug 7482]  - PatternSet.setIncludes() does not SET
includes,  but appends them to a list

On Tuesday 26 March 2002 18:25 pm, Diane wrote:
> How about adding a reset() or resetPatterns(boolean includes, boolean
> excludes) method on PatternSet, that Stephan can call explicitly!?!?! That
> way's everybody's happy, and a PatternSet instance can be reused to match
> something else? Haven't looked at any code, but it seems that would work
> for Stephan... --DD

Sounds like a perfectly good solution for me... except that i cannot access 
the pattern set belonging to the MatchedTask/Zip/Jar tasks because there are

no accessors for it (and it's not public/protected). What i was attempting 
was not something very many people are gonna try. The workarounds to make
all 
that work would create more mess than it's worth.Erik's point about:
    <patternset id="patternset" includes="....">
        <include name="..."/>
    </patternset>

shows clearly why it needs to append rather than set.  i was primary
confused 
by the setter not setting, which is as much a doc bug as an implementation 
bug. 

----- stephan
Generic Unix Computer Guy
[EMAIL PROTECTED] - http://www.einsurance.de
Office: +49 (89)  552 92 862 Handy:  +49 (179) 211 97 67
"...control is a degree of inhibition, and a system which is perfectly
inhibited is completely frozen." -- Alan W. Watts

--
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]>

Reply via email to