ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: svn commit: r714053 - /ant/core/trunk/src/main/org/apache/tools/ant/types/resources/MappedResource.java
Date Mon, 17 Nov 2008 05:16:37 GMT
On 2008-11-14, Bruce Atherton <bruce@callenish.com> wrote:

> I haven't taken a look at the the code so this is off the cuff, but
> couldn't you use a boolean field for each of the interfaces on the
> Resource class to indicate whether it is supported?

That was my first approach.

> Then have any methods that implement that interface check the
> boolean flag to see whether to proxy the request to the decorated
> resource or to throw an exception. In code which needs to determine
> the abilities of any resource, it can call an is() method rather
> than using instanceof.

That's the big point, I'd need to modify a lot of tasks.

Maybe I still should use that approach for Appendable and Touchable as
those are pretty rarely used and stick to a single sub-class that
implements FileProvider which may even be used by third-party tasks.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message