If you really want to do this, I'd advocate just shadowing the class put super-sourcing your own implementation of java.lang.Class. Probably adding an empty method that always returns null is safe, because it'll just be promoted to a global static function and inlined as 'null', e.g. Object.getClass().getType() -> null I'm more concerned with the idea that existence of this method will trick people into assuming it actually does something.
On Mon, Oct 15, 2012 at 3:04 PM, Brian Slesinsky <[email protected]> wrote: > I'm not sure this is worth doing. It's not just a matter of approving > the change; the Class class is handled specially in GWT and it would > take me a while to prove that it's safe. > > Also, this doesn't seem like a particularly good design practice to > support. Shared code should work on both client and server; if you > have a server-only method then it probably doesn't belong in the same > class as shared code. Could you move this method to a server-only > class? > > - Brian > > On Mon, Oct 15, 2012 at 2:12 PM, <[email protected]> wrote: >> On 2012/10/15 21:06:05, skybrian wrote: >>> >>> We have no plans to support reflection in client-side code. What >> >> problem are you >>> >>> trying to solve? >> >> >> I have an interface that declares a method that returns Type and is used >> on both the client and the server. In client code this method will not >> be used. >> >> >> http://gwt-code-reviews.appspot.com/1855803/ > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
