cgross at guidewire.com
Mon Jun 22 12:48:43 PDT 2009
Ah, right. Didn't catch that. I'd still advocate for an interface, so
you don't have to corner yourself in an inheritance hierarchy.
Still, infinitely better than File.
From: Mark Thornton [mailto:mthornton at optrak.co.uk]
Sent: Monday, June 22, 2009 12:43 PM
To: Carson Gross
Cc: nio-dev at openjdk.java.net
Subject: Re: Interfaces...
Carson Gross wrote:
> 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,
> 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
> The package will be a lot more flexible if you make this simple
Given that Path, FileSystem and FileStore for example are abstract with
all methods also abstract, this is already possible.
More information about the nio-dev