com.google.gwt.inject.rebind.resolution
Class BindingResolver

java.lang.Object
  extended by com.google.gwt.inject.rebind.resolution.BindingResolver

public class BindingResolver
extends java.lang.Object

Drives the top level Binding Resolution algorithm. This performs the following steps:

  1. Create a dependency graph representing all of the unresolved keys (required and optional) for a Ginjector in the hierarchy. This graph will have internal nodes for all of the implicit bindings that need to be created, and leaf nodes (no outgoing edges) for all bindings that are already available to the Ginjector. See DependencyExplorer.
  2. Verify that there are no errors in the dependency graph. Errors are detected and reported as described in UnresolvedBindingValidator which also makes use of EagerCycleFinder.
  3. Determine which injector each of the implicit bindings should be placed in, according to the constraints described in BindingPositioner.
  4. Install each implicit binding, and any ParentBindings necessary to inherit dependencies from higher in the hierarchy, to the Ginjectors. See BindingInstaller.


Constructor Summary
BindingResolver(DependencyExplorer.Factory explorerFactory, UnresolvedBindingValidator.Factory validatorFactory, com.google.gwt.inject.rebind.resolution.BindingInstaller.Factory installerFactory, com.google.gwt.core.ext.TreeLogger logger)
           
 
Method Summary
 void resolveBindings(GinjectorBindings origin)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BindingResolver

@Inject
public BindingResolver(DependencyExplorer.Factory explorerFactory,
                              UnresolvedBindingValidator.Factory validatorFactory,
                              com.google.gwt.inject.rebind.resolution.BindingInstaller.Factory installerFactory,
                              com.google.gwt.core.ext.TreeLogger logger)
Method Detail

resolveBindings

public void resolveBindings(GinjectorBindings origin)