use of com.google.gwt.inject.rebind.adapter.GwtDotCreateProvider in project google-gin by gwtplus.
the class GuiceBindingVisitor method visit.
public Void visit(ProviderInstanceBinding<? extends T> providerInstanceBinding) {
// Detect provider methods and handle them
// TODO(bstoler): Update this when the SPI explicitly has a case for
// provider methods
Provider<? extends T> provider = providerInstanceBinding.getProviderInstance();
if (provider instanceof ProviderMethod) {
Context context = Context.forElement(providerInstanceBinding);
bindingsCollection.addBinding(targetKey, bindingFactory.getProviderMethodBinding((ProviderMethod<?>) provider, context));
return null;
}
if (provider instanceof GwtDotCreateProvider) {
addImplicitBinding(providerInstanceBinding);
return null;
}
// OTt, use the normal default handler (and error)
return super.visit(providerInstanceBinding);
}
Aggregations