Hey, I would like to be able to reference a server-side class on the client side. My reason for doing this is as a wrapper for RPC that would allow me to specify the Server-Side procedure I would like to execute. For instance, I would like an API like this:
interface RpcService { void call(Class<Procedure<R,A>> procedureClass, AsyncCallback<R> callback, A args); } where procedureClass would be an instance of the Class class, referencing a server-side procedure, R would be some marker interface for a return, and A would be a set of arguments for the procedure. The problem is, the GWT compiler detects the reference to the server- side class (even though it is indirect) and marks the class as unusable. This is unfortunate (and seemingly unnecessary), because neither the server-side class, nor an instance of it is truly being referenced (at least to the point that you would need the source of the class for Class's jre emulation purposes. So, is it possible to get this sort of functionality? It would enable an RPC mechanism that is a lot easier and more natural. I don't think there would be any performance issues, but that is obviously hard to say for sure at this point. What do you say, GWTers? -- http://groups.google.com/group/Google-Web-Toolkit-Contributors