Interfaces...
Mark Thornton
mthornton at optrak.co.uk
Mon Jun 22 12:43:11 PDT 2009
Carson Gross wrote:
>
> All
>
>
>
> I'm not on list, so feel free to ignore me, but I'd like to ask that
> you consider extracting interfaces for the core classes in the nio2
> library. For example,
>
>
>
> java.nio.file.Path
>
>
>
> should have a corresponding interface, with the same methods at Path,
> so that people can write code against the interface, rather than the
> implementation. This would facilitate testing against a file system,
> a notoriously touchy problem when dealing with disks, and would give
> people the opportunity to provide innovative implementations of the
> interface (e.not-so-g. putting up a path-based representation of
> processes.)
>
>
>
> The package will be a lot more flexible if you make this simple change.
>
>
>
> Cheers,
> Carson
>
Given that Path, FileSystem and FileStore for example are abstract with
all methods also abstract, this is already possible.
Mark Thornton
More information about the nio-dev
mailing list