ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martijn Kruithof ...@kruithof.xs4all.nl>
Subject Re: [patch] NioFileUtils, FileUtilsAdapter + factory (was Re: AW: Adding a methof to StringUtils)
Date Thu, 20 Apr 2006 18:27:46 GMT
I actually had a similar problem in my dtd work recently.

We had a class that applied one single strategy to determine something 
important for telecommunication systems, had some static methods, some 
nonstatic methods, was used by different components of which some could 
not be updated.
Backward compatibility was crucial, but at the same time it was 
important that every component would use the correct strategy.

What I did was turn the constructor into an factory (however still 
staying a constructor, just creating the destination class), and turn 
the class into a proxy, towards several implementations, one of which 
would be the singleton actually used (one of which having the original 
implementation in nonstatic methods only).

Maybe the same way can be used to replace the FileUtils as wel, make the 
FileUtils class a Proxy with built in Factory.

Martijn


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


Mime
View raw message