Search in sources :

Example 1 with FactoryBinding

use of com.google.gwt.inject.rebind.binding.FactoryBinding in project google-gin by gwtplus.

the class BindingsProcessor method createBindingsForFactories.

private void createBindingsForFactories(GinjectorBindings bindings) {
    for (final FactoryModule<?> factoryModule : bindings.getFactoryModules()) {
        FactoryBinding binding;
        try {
            binding = bindingFactory.getFactoryBinding(factoryModule.getBindings(), factoryModule.getFactoryType(), Context.forText(factoryModule.getSource()));
        } catch (ConfigurationException e) {
            errorManager.logError("Factory %s could not be created", e, factoryModule.getFactoryType());
            continue;
        }
        bindings.addBinding(factoryModule.getFactoryType(), binding);
    }
}
Also used : ConfigurationException(com.google.inject.ConfigurationException) FactoryBinding(com.google.gwt.inject.rebind.binding.FactoryBinding)

Aggregations

FactoryBinding (com.google.gwt.inject.rebind.binding.FactoryBinding)1 ConfigurationException (com.google.inject.ConfigurationException)1