> What you have to do is:
>
> public <T> T lookup (Class<T> expectedClass, String key) throws
> Exception {
> Object o = doGet (key);
> if (expectedClass.isAssignableFrom (o.getClass ())) {
> return (T) o; // checked cast to type T here
> } else {
> throw new StupidAvalonProgrammerException();
> }
> }
>
> And use it client-side like this:
>
> MyComponent comp = sm.lookup (MyComponent.class, "MyComponent");
I like that.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]