Search in sources :

Example 1 with InvalidKeys

use of com.google.gwt.inject.rebind.resolution.UnresolvedBindingValidator.InvalidKeys in project google-gin by gwtplus.

the class BindingResolver method resolveBindings.

public void resolveBindings(GinjectorBindings origin) {
    TreeLogger branch = logger.branch(TreeLogger.DEBUG, PrettyPrinter.format("Resolving bindings for %s", origin));
    // Use providers so that the instances are cleaned up after this method.  This ensures that even
    // though BindingResolver may be held on to (eg, {@link GinjectorBindings}, we won't leak
    // memory used for temporary storage during resolution.
    DependencyExplorerOutput output = explorerFactory.create(branch).explore(origin);
    UnresolvedBindingValidator validator = validatorFactory.create(branch);
    InvalidKeys invalidKeys = validator.getInvalidKeys(output);
    if (validator.validate(output, invalidKeys)) {
        validator.pruneInvalidOptional(output, invalidKeys);
        installerFactory.create(branch).installBindings(output);
    }
}
Also used : TreeLogger(com.google.gwt.core.ext.TreeLogger) DependencyExplorerOutput(com.google.gwt.inject.rebind.resolution.DependencyExplorer.DependencyExplorerOutput) InvalidKeys(com.google.gwt.inject.rebind.resolution.UnresolvedBindingValidator.InvalidKeys)

Aggregations

TreeLogger (com.google.gwt.core.ext.TreeLogger)1 DependencyExplorerOutput (com.google.gwt.inject.rebind.resolution.DependencyExplorer.DependencyExplorerOutput)1 InvalidKeys (com.google.gwt.inject.rebind.resolution.UnresolvedBindingValidator.InvalidKeys)1