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 08:01:39 GMT
On 2008-11-14, Nicolas Lalevée <nicolas.lalevee@hibnet.org> wrote:

> I am not sure of how are used the "Resource" in the Ant code, but it
> makes me think of the Eclipse adapters (probably a design pattern ?):
> http://www.jeffreyricker.com/papers/Eclipse-Adapters.pdf

Sounds reasonable.

> Though it changes the tests of the appendability, the touchability,
> etc... of a Resource in the ant code, the "instanceof+cast" would be
> replaced by some "getAdapter". This solution is not very self-
> contained...

Yes.  I may stick a single subclass for FileProvider resources and
modify all occurances of Appendable and Touchable to use the adapter
method.


> But I see another solution, quite different. Probably most of the work
> should be done in the Resource class:

I thought about that, but Resource is already doing way too much IMHO.

Stefan

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


Mime
View raw message