On Nov 30, 2007 8:22 AM, Felix Meschberger <[EMAIL PROTECTED]> wrote:
> ...An extended more flexible solution would be something like this:
>
> public interface Resource {
> ....
> // get this resource as an object of the type or null if not
> possible
> <T> T adaptTo(Class<T> type);
> }...
Very interesting - this means basically delegating the typecast to the
Resource itself, which is best placed to know whether the cast makes
sense or not. I like that.
-Bertrand
