/external/guice/core/test/com/google/inject/spi/ |
D | SpiBindingsTest.java | 64 @Override public <T> Void visit(Binding<T> binding) { in testBindConstant() 65 assertTrue(binding instanceof InstanceBinding); in testBindConstant() 66 assertEquals(Key.get(Integer.class, Names.named("one")), binding.getKey()); in testBindConstant() 82 @Override public <T> Void visit(Binding<T> binding) { in testToInstanceBinding() 83 assertTrue(binding instanceof InstanceBinding); in testToInstanceBinding() 84 checkBindingSource(binding); in testToInstanceBinding() 85 assertEquals(Key.get(String.class), binding.getKey()); in testToInstanceBinding() 86 binding.acceptTargetVisitor(new FailingTargetVisitor<T>() { in testToInstanceBinding() 87 @Override public Void visit(InstanceBinding<? extends T> binding) { in testToInstanceBinding() 88 assertEquals("A", binding.getInstance()); in testToInstanceBinding() [all …]
|
D | InjectorSpiTest.java | 35 Binding<?> binding; in testExistingBinding() local 38 binding = injector.getExistingBinding(Key.get(Foo.class)); in testExistingBinding() 39 assertNotNull(binding); in testExistingBinding() 40 assertEquals(Foo.class, binding.getKey().getTypeLiteral().getRawType()); in testExistingBinding() 45 binding = injector.getExistingBinding(Key.get(new TypeLiteral<Provider<Foo>>() {})); in testExistingBinding() 46 assertNotNull(binding); in testExistingBinding() 47 assertEquals(Provider.class, binding.getKey().getTypeLiteral().getRawType()); in testExistingBinding() 48 assertEquals(Foo.class, ((Provider)binding.getProvider().get()).get().getClass()); in testExistingBinding() 51 binding = injector.getExistingBinding(Key.get(Baz.class)); in testExistingBinding() 52 assertNotNull(binding); in testExistingBinding() [all …]
|
/external/guice/extensions/multibindings/src/com/google/inject/multibindings/ |
D | Indexer.java | 65 IndexedBinding(Binding<?> binding, BindingType type, Object scope, Object extraEquality) { in IndexedBinding() argument 69 this.typeLiteral = binding.getKey().getTypeLiteral(); in IndexedBinding() 70 Element annotation = (Element) binding.getKey().getAnnotation(); in IndexedBinding() 100 boolean isIndexable(Binding<?> binding) { in isIndexable() argument 101 return binding.getKey().getAnnotation() instanceof Element; in isIndexable() 104 private Object scope(Binding<?> binding) { in scope() argument 105 return binding.acceptScopingVisitor(this); in scope() 108 @Override public Indexer.IndexedBinding visit(ConstructorBinding<? extends Object> binding) { in visit() argument 109 return new Indexer.IndexedBinding(binding, BindingType.CONSTRUCTOR, scope(binding), in visit() 110 binding.getConstructor()); in visit() [all …]
|
/external/dagger2/compiler/src/main/java/dagger/internal/codegen/ |
D | InjectBindingRegistry.java | 71 for (B binding = bindingsRequiringGeneration.poll(); in generateBindings() 72 binding != null; in generateBindings() 73 binding = bindingsRequiringGeneration.poll()) { in generateBindings() 74 checkState(!binding.hasNonDefaultTypeParameters()); in generateBindings() 75 generator.generate(binding); in generateBindings() 76 materializedBindingKeys.add(binding.key()); in generateBindings() 89 void tryRegisterBinding(B binding, ClassName factoryName, boolean explicit) { in tryRegisterBinding() argument 90 tryToCacheBinding(binding); in tryRegisterBinding() 91 tryToGenerateBinding(binding, factoryName, explicit); in tryRegisterBinding() 98 void tryToGenerateBinding(B binding, ClassName factoryName, boolean explicit) { in tryToGenerateBinding() argument [all …]
|
D | ProducerFactoryGenerator.java | 80 ClassName nameGeneratedType(ProductionBinding binding) { in nameGeneratedType() argument 81 return generatedClassNameForBinding(binding); in nameGeneratedType() 85 Iterable<? extends Element> getOriginatingElements(ProductionBinding binding) { in getOriginatingElements() argument 86 return ImmutableSet.of(binding.bindingElement()); in getOriginatingElements() 90 Optional<? extends Element> getElementForErrorReporting(ProductionBinding binding) { in getElementForErrorReporting() argument 91 return Optional.of(binding.bindingElement()); in getElementForErrorReporting() 95 ImmutableSet<JavaWriter> write(ClassName generatedTypeName, ProductionBinding binding) { in write() argument 96 TypeMirror keyType = binding.productionType().equals(Type.MAP) in write() 97 ? Util.getProvidedValueTypeOfMap(MoreTypes.asDeclared(binding.key().type())) in write() 98 : binding.key().type(); in write() [all …]
|
D | FactoryGenerator.java | 85 ClassName nameGeneratedType(ProvisionBinding binding) { in nameGeneratedType() argument 86 return generatedClassNameForBinding(binding); in nameGeneratedType() 90 Iterable<? extends Element> getOriginatingElements(ProvisionBinding binding) { in getOriginatingElements() argument 91 return ImmutableSet.of(binding.bindingElement()); in getOriginatingElements() 95 Optional<? extends Element> getElementForErrorReporting(ProvisionBinding binding) { in getElementForErrorReporting() argument 96 return Optional.of(binding.bindingElement()); in getElementForErrorReporting() 100 ImmutableSet<JavaWriter> write(ClassName generatedTypeName, ProvisionBinding binding) { in write() argument 102 checkState(!binding.hasNonDefaultTypeParameters()); in write() 104 TypeMirror keyType = binding.provisionType().equals(Type.MAP) in write() 105 ? Util.getProvidedValueTypeOfMap(MoreTypes.asDeclared(binding.key().type())) in write() [all …]
|
D | AbstractComponentWriter.java | 226 protected Optional<MemberSelect> getMultibindingContributionSnippet(ContributionBinding binding) { in getMultibindingContributionSnippet() argument 227 return Optional.fromNullable(multibindingContributionSnippets.get(binding)); in getMultibindingContributionSnippet() 243 private InitializationState getContributionInitializationState(Binding binding) { in getContributionInitializationState() argument 244 return contributionInitializationStates.containsKey(binding) in getContributionInitializationState() 245 ? contributionInitializationStates.get(binding) in getContributionInitializationState() 249 private void setContributionInitializationState(Binding binding, InitializationState state) { in setContributionInitializationState() argument 250 contributionInitializationStates.put(binding, state); in setContributionInitializationState() 747 for (ContributionBinding binding : resolvedBindings.contributionBindings()) { in initializeSetMultibindings() 749 getMultibindingContributionSnippet(binding); in initializeSetMultibindings() 750 checkState(multibindingContributionSnippet.isPresent(), "%s was not found", binding); in initializeSetMultibindings() local [all …]
|
/external/guice/extensions/grapher/src/com/google/inject/grapher/ |
D | DefaultEdgeCreator.java | 45 for (Binding<?> binding : bindings) { in getEdges() 46 edges.addAll(binding.acceptTargetVisitor(visitor)); in getEdges() 66 NodeId nodeId, T binding) { in newDependencyEdges() argument 68 for (Dependency<?> dependency : binding.getDependencies()) { in newDependencyEdges() 79 @Override public Collection<Edge> visit(ConstructorBinding<?> binding) { in visit() argument 80 return newDependencyEdges(NodeId.newTypeId(binding.getKey()), binding); in visit() 88 @Override public Collection<Edge> visit(ConvertedConstantBinding<?> binding) { in visit() argument 89 return ImmutableList.<Edge>of(new BindingEdge(NodeId.newTypeId(binding.getKey()), in visit() 90 NodeId.newTypeId(binding.getSourceKey()), in visit() 100 @Override public Collection<Edge> visit(InstanceBinding<?> binding) { in visit() argument [all …]
|
D | DefaultNodeCreator.java | 43 for (Binding<?> binding : bindings) { in getNodes() 44 nodes.addAll(binding.acceptTargetVisitor(visitor)); in getNodes() 56 private InterfaceNode newInterfaceNode(Binding<?> binding) { in newInterfaceNode() argument 57 return new InterfaceNode(NodeId.newTypeId(binding.getKey()), binding.getSource()); in newInterfaceNode() 67 private ImplementationNode newImplementationNode(Binding<?> binding, in newImplementationNode() argument 69 return new ImplementationNode(NodeId.newTypeId(binding.getKey()), binding.getSource(), in newImplementationNode() 80 private <T extends Binding<?> & HasDependencies> InstanceNode newInstanceNode(T binding, in newInstanceNode() argument 83 for (Dependency<?> dependency : binding.getDependencies()) { in newInstanceNode() 90 return new InstanceNode(NodeId.newInstanceId(binding.getKey()), binding.getSource(), instance, in newInstanceNode() 98 @Override public Collection<Node> visit(ConstructorBinding<?> binding) { in visit() argument [all …]
|
D | TransitiveDependencyVisitor.java | 58 @Override public Collection<Key<?>> visit(ConstructorBinding<?> binding) { in visit() argument 59 return visitHasDependencies(binding); in visit() 62 @Override public Collection<Key<?>> visit(ConvertedConstantBinding<?> binding) { in visit() argument 63 return visitHasDependencies(binding); in visit() 66 @Override public Collection<Key<?>> visit(InstanceBinding<?> binding) { in visit() argument 67 return visitHasDependencies(binding); in visit() 70 @Override public Collection<Key<?>> visit(LinkedKeyBinding<?> binding) { in visit() argument 71 return ImmutableSet.<Key<?>>of(binding.getLinkedKey()); in visit() 74 @Override public Collection<Key<?>> visit(ProviderBinding<?> binding) { in visit() argument 75 return ImmutableSet.<Key<?>>of(binding.getProvidedKey()); in visit() [all …]
|
/external/e2fsprogs/intl/ |
D | bindtextdom.c | 68 extern struct binding *_nl_domain_bindings; 99 struct binding *binding; in __libc_rwlock_define() local 116 for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next) in __libc_rwlock_define() 118 int compare = strcmp (domainname, binding->domainname); in __libc_rwlock_define() 125 binding = NULL; in __libc_rwlock_define() 130 if (binding != NULL) in __libc_rwlock_define() 138 *dirnamep = binding->dirname; in __libc_rwlock_define() 144 char *result = binding->dirname; in __libc_rwlock_define() 163 if (binding->dirname != INTUSE(_nl_default_dirname)) in __libc_rwlock_define() 164 free (binding->dirname); in __libc_rwlock_define() [all …]
|
/external/guice/core/src/com/google/inject/internal/ |
D | AbstractBindingBuilder.java | 52 private BindingImpl<T> binding; field in AbstractBindingBuilder 58 this.binding = new UntargettedBindingImpl<T>(source, key, Scoping.UNSCOPED); in AbstractBindingBuilder() 59 elements.add(position, this.binding); in AbstractBindingBuilder() 63 return binding; in getBinding() 66 protected BindingImpl<T> setBinding(BindingImpl<T> binding) { in setBinding() argument 67 this.binding = binding; in setBinding() 68 elements.set(position, binding); in setBinding() 69 return binding; in setBinding() 76 return setBinding(binding.withKey( in annotatedWithInternal() 77 Key.get(this.binding.getKey().getTypeLiteral(), annotationType))); in annotatedWithInternal() [all …]
|
D | AbstractBindingProcessor.java | 70 protected void putBinding(BindingImpl<?> binding) { in putBinding() argument 71 Key<?> key = binding.getKey(); in putBinding() 84 if(!isOkayDuplicate(original, binding, injector.state)) { in putBinding() 101 injector.state.parent().blacklist(key, injector.state, binding.getSource()); in putBinding() 102 injector.state.putBinding(key, binding); in putBinding() 112 private boolean isOkayDuplicate(BindingImpl<?> original, BindingImpl<?> binding, State state) { in isOkayDuplicate() argument 116 return (exposedFrom == binding.getInjector()); in isOkayDuplicate() 118 original = (BindingImpl<?>)state.getExplicitBindingsThisLevel().get(binding.getKey()); in isOkayDuplicate() 124 return original.equals(binding); in isOkayDuplicate() 144 Processor(BindingImpl<T> binding) { in Processor() argument [all …]
|
D | BindingProcessor.java | 72 public Boolean visit(ConstructorBinding<? extends T> binding) { in visit() 76 binding.getConstructor(), source, scoping, errors, false, false); in visit() 87 public Boolean visit(InstanceBinding<? extends T> binding) { in visit() argument 89 Set<InjectionPoint> injectionPoints = binding.getInjectionPoints(); in visit() 90 T instance = binding.getInstance(); in visit() 94 injector, instance, (Binding<T>) binding, source, injectionPoints); in visit() 104 public Boolean visit(ProviderInstanceBinding<? extends T> binding) { in visit() argument 106 javax.inject.Provider<? extends T> provider = binding.getUserSuppliedProvider(); in visit() 107 Set<InjectionPoint> injectionPoints = binding.getInjectionPoints(); in visit() 115 injector.provisionListenerStore.get((ProviderInstanceBinding<T>)binding)); in visit() [all …]
|
D | ProvisionListenerCallbackStore.java | 54 return create(key.binding); 65 public <T> ProvisionListenerStackCallback<T> get(Binding<T> binding) { in get() argument 67 if (!INTERNAL_BINDINGS.contains(binding.getKey())) { in get() 69 new KeyBinding(binding.getKey(), binding)); in get() 91 private <T> ProvisionListenerStackCallback<T> create(Binding<T> binding) { in create() argument 94 if (provisionBinding.getBindingMatcher().matches(binding)) { in create() 106 return new ProvisionListenerStackCallback<T>(binding, listeners); in create() 112 final Binding<?> binding; field in ProvisionListenerCallbackStore.KeyBinding 114 KeyBinding(Key<?> key, Binding<?> binding) { in KeyBinding() argument 116 this.binding = binding; in KeyBinding()
|
D | InjectorImpl.java | 138 for (Binding<?> binding : state.getExplicitBindingsThisLevel().values()) { in index() 139 index(binding); in index() 143 <T> void index(Binding<T> binding) { in index() argument 144 bindingsMultimap.put(binding.getKey().getTypeLiteral(), binding); in index() local 208 BindingImpl<T> binding = state.getExplicitBinding(key); in getBindingOrThrow() local 209 if (binding != null) { in getBindingOrThrow() 210 return binding; in getBindingOrThrow() 249 BindingImpl<T> binding = (BindingImpl<T>) injector.jitBindings.get(key); in getJustInTimeBinding() local 251 if (binding != null) { in getJustInTimeBinding() 257 && !(binding instanceof ConvertedConstantBindingImpl)) { in getJustInTimeBinding() [all …]
|
/external/elfutils/libebl/ |
D | eblsymbolbindingname.c | 39 ebl_symbol_binding_name (Ebl *ebl, int binding, char *buf, size_t len) in ebl_symbol_binding_name() argument 43 res = ebl != NULL ? ebl->symbol_type_name (binding, buf, len) : NULL; in ebl_symbol_binding_name() 52 if (binding < STB_NUM) in ebl_symbol_binding_name() 53 res = stb_names[binding]; in ebl_symbol_binding_name() 58 if (binding >= STB_LOPROC && binding <= STB_HIPROC) in ebl_symbol_binding_name() 59 snprintf (buf, len, "LOPROC+%d", binding - STB_LOPROC); in ebl_symbol_binding_name() 60 else if (binding == STB_GNU_UNIQUE in ebl_symbol_binding_name() 64 else if (binding >= STB_LOOS && binding <= STB_HIOS) in ebl_symbol_binding_name() 65 snprintf (buf, len, "LOOS+%d", binding - STB_LOOS); in ebl_symbol_binding_name() 67 snprintf (buf, len, gettext ("<unknown>: %d"), binding); in ebl_symbol_binding_name()
|
/external/guice/core/src/com/google/inject/ |
D | Scopes.java | 90 public static boolean isSingleton(Binding<?> binding) { in isSingleton() argument 92 boolean singleton = binding.acceptScopingVisitor(IS_SINGLETON_VISITOR); in isSingleton() 97 if (binding instanceof LinkedBindingImpl) { in isSingleton() 98 LinkedBindingImpl<?> linkedBinding = (LinkedBindingImpl) binding; in isSingleton() 101 binding = injector.getBinding(linkedBinding.getLinkedKey()); in isSingleton() 104 } else if(binding instanceof ExposedBinding) { in isSingleton() 105 ExposedBinding<?> exposedBinding = (ExposedBinding)binding; in isSingleton() 108 binding = injector.getBinding(exposedBinding.getKey()); in isSingleton() 129 public static boolean isScoped(Binding<?> binding, final Scope scope, in isScoped() argument 132 boolean matches = binding.acceptScopingVisitor(new BindingScopingVisitor<Boolean>() { in isScoped() [all …]
|
/external/guice/extensions/servlet/test/com/google/inject/servlet/ |
D | ServletSpiVisitor.java | 75 public Integer visit(InstanceFilterBinding binding) { in visit() argument 76 actual.add(new Params(binding, binding.getFilterInstance())); in visit() 80 public Integer visit(InstanceServletBinding binding) { in visit() argument 81 actual.add(new Params(binding, binding.getServletInstance())); in visit() 85 public Integer visit(LinkedFilterBinding binding) { in visit() argument 86 actual.add(new Params(binding, binding.getLinkedKey())); in visit() 90 public Integer visit(LinkedServletBinding binding) { in visit() argument 91 actual.add(new Params(binding, binding.getLinkedKey())); in visit() 96 protected Integer visitOther(Binding<? extends Object> binding) { in visitOther() argument 97 if(!allowedClasses.contains(binding.getKey().getTypeLiteral().getRawType())) { in visitOther() [all …]
|
D | FilterDefinitionTest.java | 42 Binding binding = createMock(Binding.class); in testFilterInitAndConfig() local 46 expect(binding.acceptScopingVisitor((BindingScopingVisitor) anyObject())) in testFilterInitAndConfig() 49 .andReturn(binding); in testFilterInitAndConfig() 55 replay(binding, injector); in testFilterInitAndConfig() 88 verify(binding, injector, servletContext); in testFilterInitAndConfig() 93 Binding binding = createMock(Binding.class); in testFilterCreateDispatchDestroy() local 98 expect(binding.acceptScopingVisitor((BindingScopingVisitor) anyObject())) in testFilterCreateDispatchDestroy() 101 .andReturn(binding); in testFilterCreateDispatchDestroy() 112 replay(injector, binding, request); in testFilterCreateDispatchDestroy() 148 Binding binding = createMock(Binding.class); in testFilterCreateDispatchDestroySupressChain() local [all …]
|
D | ServletModuleTest.java | 55 for(Binding<?> binding : injector.getAllBindings().values()) { in testServletModuleReuse() 56 binding.acceptTargetVisitor(visitor); in testServletModuleReuse() 83 public Void visit(LinkedFilterBinding binding) { in visit() argument 84 linkedFilters.add(binding); in visit() 88 public Void visit(InstanceFilterBinding binding) { in visit() argument 89 instanceFilters.add(binding); in visit() 93 public Void visit(LinkedServletBinding binding) { in visit() argument 94 linkedServlets.add(binding); in visit() 98 public Void visit(InstanceServletBinding binding) { in visit() argument 99 instanceServlets.add(binding); in visit()
|
/external/guice/core/src/com/google/inject/spi/ |
D | BindingTargetVisitor.java | 32 V visit(InstanceBinding<? extends T> binding); in visit() argument 38 V visit(ProviderInstanceBinding<? extends T> binding); in visit() argument 45 V visit(ProviderKeyBinding<? extends T> binding); in visit() argument 51 V visit(LinkedKeyBinding<? extends T> binding); in visit() argument 57 V visit(ExposedBinding<? extends T> binding); in visit() argument 63 V visit(UntargettedBinding<? extends T> binding); in visit() argument 69 V visit(ConstructorBinding<? extends T> binding); in visit() argument 76 V visit(ConvertedConstantBinding<? extends T> binding); in visit() argument 82 V visit(ProviderBinding<? extends T> binding); in visit() argument
|
/external/libmojo/mojo/public/cpp/bindings/tests/ |
D | binding_unittest.cc | 88 Binding<sample::Service> binding(&impl, std::move(request)); in TEST_F() local 90 binding.Close(); in TEST_F() 108 Binding<sample::Service> binding(&impl, std::move(request)); in TEST_F() local 137 Binding<sample::Service> binding(&impl, GetProxy(&ptr)); in TEST_F() local 139 binding.set_connection_error_handler( in TEST_F() 156 Binding<sample::Service> binding(&impl, GetProxy(&ptr)); in TEST_F() local 158 binding.set_connection_error_handler(SetFlagAndRunClosure(&called)); in TEST_F() 159 binding.Close(); in TEST_F() 214 Binding<sample::Service> binding(&impl, GetProxy(&ptr)); in TEST_F() local 225 auto request = binding.Unbind(); in TEST_F() [all …]
|
/external/vulkan-validation-layers/layers/ |
D | descriptor_sets.cpp | 33 binding_to_index_map_[p_create_info->pBindings[i].binding] = i; in DescriptorSetLayout() 34 binding_to_global_start_index_map_[p_create_info->pBindings[i].binding] = global_index; in DescriptorSetLayout() 36 binding_to_global_end_index_map_[p_create_info->pBindings[i].binding] = global_index; in DescriptorSetLayout() 58 if (!bindings.insert(create_info->pBindings[i].binding).second) { in ValidateCreateInfo() 74 …t::DescriptorSetLayout::GetDescriptorSetLayoutBindingPtrFromBinding(const uint32_t binding) const { in GetDescriptorSetLayoutBindingPtrFromBinding() 75 const auto &bi_itr = binding_to_index_map_.find(binding); in GetDescriptorSetLayoutBindingPtrFromBinding() 88 uint32_t cvdescriptorset::DescriptorSetLayout::GetDescriptorCountFromBinding(const uint32_t binding… in GetDescriptorCountFromBinding() 89 const auto &bi_itr = binding_to_index_map_.find(binding); in GetDescriptorCountFromBinding() 102 VkDescriptorType cvdescriptorset::DescriptorSetLayout::GetTypeFromBinding(const uint32_t binding) c… in GetTypeFromBinding() 103 assert(binding_to_index_map_.count(binding)); in GetTypeFromBinding() [all …]
|
/external/guice/extensions/jmx/src/com/google/inject/tools/jmx/ |
D | ManagedBinding.java | 23 final Binding binding; field in ManagedBinding 25 ManagedBinding(Binding binding) { in ManagedBinding() argument 26 this.binding = binding; in ManagedBinding() 30 return binding.getSource().toString(); in getSource() 34 return binding.getKey().toString(); in getKey() 38 return binding.getProvider().toString(); in getProvider()
|