@Override public boolean equals(Object obj) { if (obj instanceof BindingSelection) { return setKey.equals(((BindingSelection<?>) obj).setKey); } return false; }
@Override public boolean equals(Object obj) { return obj instanceof KeyBinding && key.equals(((KeyBinding) obj).key); }
@Override public boolean equals(Object o) { return o instanceof BindingSelection && ((BindingSelection) o).key.equals(key); }
@Override public boolean equals(Object o) { return o instanceof PermitDuplicatesModule && ((PermitDuplicatesModule) o).key.equals(key); }
@Override public boolean equals(Object o) { return o instanceof BindingSelection && ((BindingSelection<?, ?>) o).mapKey.equals(mapKey); }
@Override public boolean equals(Object obj) { if (obj instanceof ProviderMapEntry) { ProviderMapEntry<?, ?> o = (ProviderMapEntry<?, ?>) obj; return key.equals(o.key) && valueKey.equals(o.valueKey); } return false; }
@Override public boolean equals(Object obj) { return obj != null && this.getClass() == obj.getClass() && mapKey.equals(((RealMultimapBinderProviderWithDependencies<?, ?, ?>) obj).mapKey); }
boolean containsElement(com.google.inject.spi.Element element) { if (element instanceof Binding) { Binding<?> binding = (Binding<?>) element; return keyMatches(binding.getKey()) || binding.getKey().equals(getPermitDuplicatesKey()) || binding.getKey().equals(setKey) || binding.getKey().equals(collectionOfProvidersKey) || binding.getKey().equals(collectionOfJavaxProvidersKey); } else { return false; } }
private boolean containsElement(Element element) { if (entrySetBinder.containsElement(element)) { return true; } Key<?> key; if (element instanceof Binding) { key = ((Binding<?>) element).getKey(); } else { return false; // cannot match; } return key.equals(getMapKey()) || key.equals(getProviderMapKey()) || key.equals(getJavaxProviderMapKey()) || key.equals(getMultimapKey()) || key.equals(getProviderSetMultimapKey()) || key.equals(getJavaxProviderSetMultimapKey()) || key.equals(getProviderCollectionMultimapKey()) || key.equals(getJavaxProviderCollectionMultimapKey()) || key.equals(entrySetBinder.getSetKey()) || key.equals(getEntrySetJavaxProviderKey()) || matchesValueKey(key); }
/** Implementation of {@link OptionalBinderBinding#containsElement}. */ boolean containsElement(Element element) { // All of our bindings are ProviderInstanceBindings whose providers extend // RealOptionalBinderProviderWithDependencies and have 'this' as its binding selection. if (element instanceof ProviderInstanceBinding) { javax.inject.Provider<?> providerInstance = ((ProviderInstanceBinding<?>) element).getUserSuppliedProvider(); if (providerInstance instanceof RealOptionalBinderProviderWithDependencies) { return ((RealOptionalBinderProviderWithDependencies<?, ?>) providerInstance) .bindingSelection.equals(this); } } if (element instanceof Binding) { Key<?> elementKey = ((Binding) element).getKey(); // if it isn't one of the things we bound directly it might be an actual or default key return elementKey.equals(getKeyForActualBinding()) || elementKey.equals(getKeyForDefaultBinding()); } return false; // cannot match; }
@Override public boolean equals(Object obj) { if (obj instanceof ProviderBindingImpl) { ProviderBindingImpl<?> o = (ProviderBindingImpl<?>) obj; return getKey().equals(o.getKey()) && getScoping().equals(o.getScoping()) && Objects.equal(providedBinding, o.providedBinding); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof ConstructorBindingImpl) { ConstructorBindingImpl<?> o = (ConstructorBindingImpl<?>) obj; return getKey().equals(o.getKey()) && getScoping().equals(o.getScoping()) && Objects.equal(constructorInjectionPoint, o.constructorInjectionPoint); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof ConvertedConstantBindingImpl) { ConvertedConstantBindingImpl<?> o = (ConvertedConstantBindingImpl<?>) obj; return getKey().equals(o.getKey()) && getScoping().equals(o.getScoping()) && Objects.equal(value, o.value); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof LinkedBindingImpl) { LinkedBindingImpl<?> o = (LinkedBindingImpl<?>) obj; return getKey().equals(o.getKey()) && getScoping().equals(o.getScoping()) && Objects.equal(targetKey, o.targetKey); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof InstanceBindingImpl) { InstanceBindingImpl<?> o = (InstanceBindingImpl<?>) obj; return getKey().equals(o.getKey()) && getScoping().equals(o.getScoping()) && Objects.equal(instance, o.instance); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof LinkedProviderBindingImpl) { LinkedProviderBindingImpl<?> o = (LinkedProviderBindingImpl<?>) obj; return getKey().equals(o.getKey()) && getScoping().equals(o.getScoping()) && Objects.equal(providerKey, o.providerKey); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof ProviderInstanceBindingImpl) { ProviderInstanceBindingImpl<?> o = (ProviderInstanceBindingImpl<?>) obj; return getKey().equals(o.getKey()) && getScoping().equals(o.getScoping()) && Objects.equal(providerInstance, o.providerInstance); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof UntargettedBindingImpl) { UntargettedBindingImpl<?> o = (UntargettedBindingImpl<?>) obj; return getKey().equals(o.getKey()) && getScoping().equals(o.getScoping()); } else { return false; } }
@Override public Boolean visit(LinkedKeyBinding<? extends T> binding) { prepareBinding(); Key<? extends T> linkedKey = binding.getLinkedKey(); if (key.equals(linkedKey)) { errors.recursiveBinding(); } FactoryProxy<T> factory = new FactoryProxy<>(injector, key, linkedKey, source); bindingData.addCreationListener(factory); InternalFactory<? extends T> scopedFactory = Scoping.scope(key, injector, factory, source, scoping); putBinding( new LinkedBindingImpl<T>(injector, key, source, scopedFactory, scoping, linkedKey)); return true; }
if (dependency.getParameterIndex() == 0 && dependency.getKey().equals(keyC1)) { foundC1 = true; } else if (dependency.getParameterIndex() == 1 && dependency.getKey().equals(keyC2)) { foundC2 = true; } else { if (dependency.getKey().equals(keyV1)) { foundV1 = true; } else if (dependency.getKey().equals(keyV2)) { foundV2 = true; } else { if (dependency.getKey().equals(keyF1)) { foundF1 = true; } else {