This is just what we did in a special ServiceRegistry-Wrapper in our
application. We just
parameterized the methods so we dont need to cast in the app.
public static <T> T getService(String serviceId, Class<T>
serviceInterface) {
return (T) registry.getService(serviceId, serviceInterface);
}
public static <T> T getService(Class<T> serviceInterface) {
return (T) registry.getService(serviceInterface);
}
> -----Ursprüngliche Nachricht-----
> Von: James Carman [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 17. Juni 2005 12:50
> An: [email protected]; 'Glen Stampoultzis'
> Betreff: RE: Calls to registry.getService()
>
>
> It's for type-safety. If we were using JDK1.5, we would just have the
> method return the type specified as the parameter.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]