Examples of acceptTargetVisitor()


Examples of com.google.inject.Binding.acceptTargetVisitor()

    MapBinderBinding<Map<Source, T>> mapbinderBinding = null;
    Key<?> defaultKey = null;
    Key<?> actualKey = null;

    Binding optionalBinding = indexed.get(optionalKey);
    optionalBinder = (OptionalBinderBinding<T>) optionalBinding.acceptTargetVisitor(visitor);
    Binding mapBinding = indexed.get(sourceMapKey);
    mapbinderBinding = (MapBinderBinding<Map<Source, T>>) mapBinding.acceptTargetVisitor(visitor);

    // Locate the defaultKey & actualKey
    for (Element element : elements) {
View Full Code Here

Examples of com.google.inject.Binding.acceptTargetVisitor()

    Key<?> actualKey = null;

    Binding optionalBinding = indexed.get(optionalKey);
    optionalBinder = (OptionalBinderBinding<T>) optionalBinding.acceptTargetVisitor(visitor);
    Binding mapBinding = indexed.get(sourceMapKey);
    mapbinderBinding = (MapBinderBinding<Map<Source, T>>) mapBinding.acceptTargetVisitor(visitor);

    // Locate the defaultKey & actualKey
    for (Element element : elements) {
      if (optionalBinder.containsElement(element) && element instanceof Binding) {
        Binding binding = (Binding) element;
View Full Code Here

Examples of com.google.inject.Binding.acceptTargetVisitor()

      Key key = null;
      Binding b = null;
      if (element instanceof Binding) {
        b = (Binding) element;
        key = b.getKey();
        Object visited = b.acceptTargetVisitor(visitor);
        if (visited instanceof OptionalBinderBinding) {
          if (visited.equals(optionalBinder)) {
            assertTrue(contains);
          } else {
            otherOptionalElements.add(visited);
View Full Code Here

Examples of com.google.inject.Binding.acceptTargetVisitor()

        optionalProviderKeyMatch = true;
      } else if (key != null && key.equals(sourceMapKey)) {
        assertTrue(contains);
        mapBindingMatch = true;
        // Validate that this binding is also a MapBinding.
        assertEquals(mapbinderBinding, b.acceptTargetVisitor(visitor));
      } else if (key != null && key.equals(defaultKey)) {
        assertTrue(contains);
        if (b != null) { // otherwise it might just be a ProviderLookup into it
          assertTrue("expected: " + expectedDefault + ", but was: " + b,
              matches(b, expectedDefault));
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.