Examples of ParentBinding


Examples of com.google.gwt.inject.rebind.binding.ParentBinding

      // Special cases: parent / child bindings induce dependencies between
      // GinjectorBindings objects, which can't be represented in the standard
      // dependency graph.
      if (binding instanceof ParentBinding) {
        ParentBinding parentBinding = (ParentBinding) binding;
        PrettyPrinter.log(logger, TreeLogger.DEBUG, "%s:%s -> %s:%s [inherited]",
            bindings, key, parentBinding.getParentBindings(), key);
        traceKey(key, parentBinding.getParentBindings());
      } else if (binding instanceof ExposedChildBinding) {
        ExposedChildBinding exposedChildBinding = (ExposedChildBinding) binding;
        PrettyPrinter.log(logger, TreeLogger.DEBUG, "%s:%s -> %s:%s [exposed]",
            bindings, key, exposedChildBinding.getChildBindings(), key);
        traceKey(key, exposedChildBinding.getChildBindings());
View Full Code Here

Examples of com.google.gwt.inject.rebind.binding.ParentBinding

    expect(positions.getInstallPosition(bar())).andStubReturn(root);
   
    Map<Key<?>, Binding> implicitBindingMap = new HashMap<Key<?>, Binding>();
   
    // Parent Binding to make bar available to child
    ParentBinding barBinding = control.createMock("barBinding", ParentBinding.class);
    expect(child.isBound(bar())).andReturn(false);
    expect(bindingFactory.getParentBinding(eq(bar()), eq(root), isA(Context.class)))
        .andReturn(barBinding);
   
    // Implicit binding for Foo
View Full Code Here

Examples of com.google.gwt.inject.rebind.binding.ParentBinding

    expect(positions.getInstallPosition(baz())).andStubReturn(child);
   
    Map<Key<?>, Binding> implicitBindingMap = new HashMap<Key<?>, Binding>();
   
    // Parent Binding to make bar available to child
    ParentBinding barBinding = control.createMock("barBinding", ParentBinding.class);
    expect(child.isBound(bar())).andReturn(false);
    expect(bindingFactory.getParentBinding(eq(bar()), eq(root), isA(Context.class)))
        .andReturn(barBinding);

    // Implicit binding for Bar
View Full Code Here

Examples of com.google.gwt.inject.rebind.binding.ParentBinding

    GinjectorBindings nextGinjector = null;
    if (binding instanceof ExposedChildBinding) {
      ExposedChildBinding childBinding = (ExposedChildBinding) binding;
      nextGinjector = childBinding.getChildBindings();
    } else if (binding instanceof ParentBinding) {
      ParentBinding parentBinding = (ParentBinding) binding;
      nextGinjector = parentBinding.getParentBindings();
    }
    return nextGinjector;
  }
View Full Code Here

Examples of com.google.gwt.inject.rebind.binding.ParentBinding

    expect(binding.getChildBindings()).andReturn(child).anyTimes();
    bindings.add(binding);
  }
 
  private void bindParent(Key<?> key, GinjectorBindings parent, GinjectorBindings child) {
    ParentBinding binding = control.createMock(ParentBinding.class);
    expect(binding.getContext()).andReturn(Context.forText("")).anyTimes();
    expect(binding.getParentBindings()).andReturn(parent).anyTimes();
    expect(child.isBound(key)).andReturn(true).anyTimes();
    expect(child.getBinding(key)).andReturn(binding).anyTimes();
    bindings.add(binding);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.