> OK, *that* is something that can't be statically checked. The upside is
> that
> we've isolated the *only* part that can't be statically checked, and
> we've isolated it in the container:
>
>             try {
>                 return (T) o; // unchecked cast to type T here, should
> be fine.
>             } catch (Throwable t) {
>                 return null;
>             }
>
> /LS

So, in the container code, we could have something like this:

if (o instanceof T) {
    return o;
} else {
    throw new StupidAvalonProgrammerException(); // instead of
ClassCastException
}


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

Reply via email to