I have a problem, I need to change body of method when this class is compiled for the gwt client. For server side I’m use reflection and I don’t need this method for client side, so it can be empty. Here is the method:
public void check(Class<?> typeClass, Object object) {
if (!typeClass.isAssignableFrom(object.getClass()))
throw new RuntimeException("Check doesn't pass!");
}
So what I need is to check if the typeClass is a superclass or superinteface of object.
You can use GWT.isClient() to check if the code is running on the client or server.
As alternative, you can try to use super-source in your gwt.xml file to provide a client only version of your class.