On 2008-11-14, Bruce Atherton <[EMAIL PROTECTED]> wrote:

> I haven't taken a look at the the code so this is off the cuff, but
> couldn't you use a boolean field for each of the interfaces on the
> Resource class to indicate whether it is supported?

That was my first approach.

> Then have any methods that implement that interface check the
> boolean flag to see whether to proxy the request to the decorated
> resource or to throw an exception. In code which needs to determine
> the abilities of any resource, it can call an is() method rather
> than using instanceof.

That's the big point, I'd need to modify a lot of tasks.

Maybe I still should use that approach for Appendable and Touchable as
those are pretty rarely used and stick to a single sub-class that
implements FileProvider which may even be used by third-party tasks.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to