com.googlecode.gwt.test.internal.resources.ClientBundleCreateHandler Maven / Gradle / Ivy
package com.googlecode.gwt.test.internal.resources;
import com.google.gwt.resources.client.ClientBundle;
import com.googlecode.gwt.test.GwtCreateHandler;
/**
* Class in charge of the instanciation of all {@link ClientBundle} sub-interfaces through deferred
* binding. For internal use only.
*
* @author Gael Lazzari
*/
@SuppressWarnings("unchecked")
public class ClientBundleCreateHandler implements GwtCreateHandler {
public Object create(Class classLiteral) throws Exception {
if (!ClientBundle.class.isAssignableFrom(classLiteral)) {
return null;
}
return ClientBundleProxyFactory.getFactory((Class) classLiteral).createProxy();
}
}