ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: [patch] NioFileUtils, FileUtilsAdapter + factory (was Re: AW: Adding a methof to StringUtils)
Date Thu, 20 Apr 2006 15:05:30 GMT
--- Kevin Jackson <foamdino@gmail.com> wrote:

> > I found it in Kev's (long :) mail:
> >
> 
> Sorry it was rather long, but there were a few files
> packed in there!

parenthetical smiley above.

> > 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?)
> 
That's the way I understand it.  Antoine cited Regexp
factory stuff (o.a.t.a.util.regexp); it looks like the
biggest lesson to take from here would be the use of
ClasspathUtils:

return (FileUtilsAdapter)
ClasspathUtils.newInstance(className,
FileUtilsAdapter.class.getClassLoader(),
FileUtilsAdapter.class);

-Matt

[SNIP]

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message