ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Jackson" <>
Subject Re: [patch] NioFileUtils, FileUtilsAdapter + factory (was Re: AW: Adding a methof to StringUtils)
Date Thu, 20 Apr 2006 14:36:38 GMT
> I found it in Kev's (long :) mail:

Sorry it was rather long, but there were a few files packed in there!
> Since the other impls will be conditionally compiled,
> we should use Class.forInstance()...

ok, so we use dynamic class-loading to get the correct fileutils?  Is
there an example in the code already of how I should do this, (like in
the ComplilerAdapter code perhaps?)

> What would the Project reference be used for?
> Kev: your mail showed:
> public class NioFileUtils extends FileUtils implements
> FileUtilsAdapter {...}
> public class Java6FileUtils extends FileUtils
> implements FileUtilsAdapter {...}
> But shouldn't that actually be:
> +public class FileUtils implements FileUtilsAdapter
> {...}
> public class NioFileUtils extends FileUtils {...}
> public class Java6FileUtils extends NioFileUtils {...}

Probably yes, I think I cobbled it together in a hap-hazard fashion -
first the interface, then change the FileUtils etc, so I could
probably remove the implements FileUtilsAdapter from the subclasses, I
just wanted to make sure I wasn't 'polishing a turd', ie wasting time
getting every little thing right, if the overall direction of the code
was wrong.

Thanks for comments

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message