@Override @SuppressWarnings({ "unchecked" }) public <T> T getRemoteProxy(final Class<T> proxyType) { Assert.notNull(proxyType); if (remoteProxyProviders.isEmpty()) { throw new RuntimeException("There are no proxy providers registered.\n" + "Hint: You may need to move this call to an @AfterInitialization method."); } final ProxyProvider proxyProvider = remoteProxyProviders.get(proxyType); if (proxyProvider == null) { throw new RuntimeException("No proxy provider found for type [" + proxyType.getName() + "].\n" + "Hint: Did you just add a new remote interface? The GWT generator may not have run in which case you should try:\n" + "\t1. Touching an RPC interface that already has a proxy and refreshing (i.e. run `touch RemoteInterface.java`).\n" + "\t2. Clear your Super Dev Mode cache (go to 127.0.0.1:9876 and click \"clear cache\").\n" + "\t3. Run Super Dev Mode without incremental compilation."); } final Object proxy = proxyProvider.getProxy(); if (proxy == null) { throw new RuntimeException("No proxy instance provided for: " + proxyType.getName()); } return (T) proxy; }
@Override @SuppressWarnings({ "unchecked" }) public <T> T getRemoteProxy(final Class<T> proxyType) { Assert.notNull(proxyType); if (remoteProxyProviders.isEmpty()) { throw new RuntimeException("There are no proxy providers registered.\n" + "Hint: You may need to move this call to an @AfterInitialization method."); } final ProxyProvider proxyProvider = remoteProxyProviders.get(proxyType); if (proxyProvider == null) { throw new RuntimeException("No proxy provider found for type [" + proxyType.getName() + "].\n" + "Hint: Did you just add a new remote interface? The GWT generator may not have run in which case you should try:\n" + "\t1. Touching an RPC interface that already has a proxy and refreshing (i.e. run `touch RemoteInterface.java`).\n" + "\t2. Clear your Super Dev Mode cache (go to 127.0.0.1:9876 and click \"clear cache\").\n" + "\t3. Run Super Dev Mode without incremental compilation."); } final Object proxy = proxyProvider.getProxy(); if (proxy == null) { throw new RuntimeException("No proxy instance provided for: " + proxyType.getName()); } return (T) proxy; }