Examples of ExposedChildBinding


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

        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.ExposedChildBinding

        for (Map.Entry<Key<?>, GinjectorBindings> keyAndChild : keyToChildMap.entrySet()) {
          Key<?> key = keyAndChild.getKey();
          GinjectorBindings child = keyAndChild.getValue();

          expect(parent.getBinding(key))
              .andReturn(new ExposedChildBinding(errorManager, Key.get(Long.class), child,
                  Context.forText("")))
              .anyTimes();
        }
      }
    }
View Full Code Here

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

    childVisitor.visitElements(privateElements.getElements());
    messages.addAll(childVisitor.getMessages());
   
    // Add information about the exposed elements in child to the current binding collection
    for (Key<?> key : privateElements.getExposedKeys()) {
      ExposedChildBinding childBinding =
          bindingFactory.getExposedChildBinding(key, childCollection,
              Context.forElement(privateElements));

      // The child must have an explicit binding or pin for anything it exposes.
      //
View Full Code Here

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

  }

  private GinjectorBindings linkedGinjector(Binding binding) {
    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.ExposedChildBinding

    expect(in.getBinding(key)).andReturn(binding).anyTimes();
    bindings.add(binding);
  }
 
  private void bindChild(Key<?> key, GinjectorBindings parent, GinjectorBindings child) {
    ExposedChildBinding binding = control.createMock(ExposedChildBinding.class);
    expect(binding.getContext()).andReturn(Context.forText("")).anyTimes();
    expect(parent.isBound(key)).andReturn(true).anyTimes();
    expect(parent.getBinding(key)).andReturn(binding).anyTimes();
    expect(child.isPinned(key)).andReturn(true).anyTimes();
    expect(binding.getChildBindings()).andReturn(child).anyTimes();
    bindings.add(binding);
  }
View Full Code Here

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

      } else if (!(binding instanceof ExposedChildBinding)) {
        // This should never happen (it would have been caught as a
        // double-binding earlier).
        throw new RuntimeException("Unexpected binding shadowing a pinned binding: " + binding);
      } else {
        ExposedChildBinding exposedChildBinding = (ExposedChildBinding) binding;
        if (exposedChildBinding.getChildBindings() != child) {
          throw new RuntimeException(
              "Unexpected exposed child binding shadowing a pinned binding: " + binding);
        } else {
          return true;
        }
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.