public interface GenericsRpcService<T,K> extends RemoteService{
T callServer(List<K> id);
T callServer(K id);
}
T callServer(List<K> id);
T callServer(K id);
}
public interface UserRpcService extends GenericsRpcService<User, Long> {
// Other (additional methods).
}
Notice the 2 methods from GenericsRpcService are already present in the subinterface. This is the only advantage you can get. Besides, you need a type literal for GWT.create so there's no way to call GWT.create (GenericRpcService<A, B>.class) (same goes with dependency injection -- you can't bind a generics interface).
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/zx_oR4chgLUJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment