Home
last modified time | relevance | path

Searched refs:binder (Results 1 – 25 of 165) sorted by relevance

1234567

/external/guice/core/src/com/google/inject/
DPrivateModule.java21 import com.google.inject.binder.AnnotatedBindingBuilder;
22 import com.google.inject.binder.AnnotatedConstantBindingBuilder;
23 import com.google.inject.binder.AnnotatedElementBuilder;
24 import com.google.inject.binder.LinkedBindingBuilder;
92 private PrivateBinder binder; field in PrivateModule
94 public final synchronized void configure(Binder binder) { in configure() argument
95 checkState(this.binder == null, "Re-entry is not allowed."); in configure()
98 this.binder = (PrivateBinder) binder.skipSources(PrivateModule.class); in configure()
102 this.binder = null; in configure()
114 binder().expose(key); in expose()
[all …]
DAbstractModule.java22 import com.google.inject.binder.AnnotatedBindingBuilder;
23 import com.google.inject.binder.AnnotatedConstantBindingBuilder;
24 import com.google.inject.binder.LinkedBindingBuilder;
55 Binder binder; field in AbstractModule
58 checkState(this.binder == null, "Re-entry is not allowed."); in configure()
60 this.binder = checkNotNull(builder, "builder"); in configure()
65 this.binder = null; in configure()
77 protected Binder binder() { in binder() method in AbstractModule
78 checkState(binder != null, "The binder can only be used inside configure()"); in binder()
79 return binder; in binder()
[all …]
/external/guice/core/test/com/google/inject/
DModuleTest.java15 public void configure(Binder binder) { in configure() argument
16 binder.bind(X.class); in configure()
17 binder.install(new B()); in configure()
18 binder.install(new C()); in configure()
23 public void configure(Binder binder) { in configure() argument
24 binder.bind(Y.class); in configure()
25 binder.install(new D()); in configure()
30 public void configure(Binder binder) { in configure() argument
31 binder.bind(Z.class); in configure()
32 binder.install(new D()); in configure()
[all …]
DJitBindingsTest.java61 binder().requireExplicitBindings(); in testLinkedBindingWorks()
77 binder().requireExplicitBindings(); in testMoreBasicsWork()
95 binder().requireExplicitBindings(); in testLinkedEagerSingleton()
111 binder().requireExplicitBindings(); in testBasicsWithEagerSingleton()
129 binder.requireExplicitBindings(); in testLinkedToScoped()
145 binder().requireExplicitBindings(); in testBasicsWithScoped()
164 binder().requireExplicitBindings(); in testFailsIfInjectingScopedDirectlyWhenItIsntBound()
180 binder().requireExplicitBindings(); in testLinkedProviderBindingWorks()
196 binder().requireExplicitBindings(); in testJitGetFails()
211 binder().requireExplicitBindings(); in testJitInjectionFails()
[all …]
DRequireAtInjectOnConstructorsTest.java35 binder().requireAtInjectOnConstructors(); in testNoCxtors_explicitBinding()
52 binder().requireAtInjectOnConstructors(); in testNoCxtors_jitBinding()
72 binder().requireAtInjectOnConstructors(); in testNoCxtors_implicitBinding()
90 binder().requireAtInjectOnConstructors(); in testNoCxtors_inheritedByPrivateModules()
116 binder().requireAtInjectOnConstructors(); in testNoCxtors_accumulatesAllErrors()
141 binder().requireAtInjectOnConstructors(); in testNoCxtors_separateOptionsForPrivateModules()
165 binder().requireAtInjectOnConstructors(); in testManyConstructorsButNoneWithAtInject()
188 binder().requireAtInjectOnConstructors(); in testRequireAtInjectStillAllowsToConstructorBindings()
/external/wpa_supplicant_8/wpa_supplicant/binder/
Dsupplicant.cpp21 android::binder::Status Supplicant::CreateInterface( in CreateInterface()
29 return android::binder::Status::fromServiceSpecificError( in CreateInterface()
43 return android::binder::Status::fromServiceSpecificError( in CreateInterface()
47 android::binder::Status status; in CreateInterface()
62 status = android::binder::Status::fromServiceSpecificError( in CreateInterface()
71 status = android::binder::Status::fromServiceSpecificError( in CreateInterface()
75 status = android::binder::Status::ok(); in CreateInterface()
85 android::binder::Status Supplicant::RemoveInterface(const std::string &ifname) in RemoveInterface()
91 return android::binder::Status::fromServiceSpecificError( in RemoveInterface()
95 return android::binder::Status::fromServiceSpecificError( in RemoveInterface()
[all …]
/external/guice/extensions/multibindings/src/com/google/inject/multibindings/
DMultibindingsScanner.java53 binder().scanModulesForAnnotatedMethods(Scanner.INSTANCE); in asModule()
78 public <T> Key<T> prepareMethod(Binder binder, Annotation annotation, Key<T> key,
81 AnnotationOrError mapKey = findMapKeyAnnotation(binder, method);
84 binder.addError("Found a MapKey annotation on non map binding at %s.", method);
86 return Multibinder.newRealSetBinder(binder, key).getKeyForNewItem();
94 binder.addError("No MapKey found for map binding at %s.", method);
98 return MapBinder.newRealMapBinder(binder, typeAndValue.type, key)
102 binder.addError("Found a MapKey annotation on non map binding at %s.", method);
106 return OptionalBinder.newRealOptionalBinder(binder, key).getKeyForDefaultBinding();
108 return OptionalBinder.newRealOptionalBinder(binder, key).getKeyForActualBinding();
[all …]
DMultibinder.java41 import com.google.inject.binder.LinkedBindingBuilder;
123 public static <T> Multibinder<T> newSetBinder(Binder binder, TypeLiteral<T> type) { in newSetBinder() argument
124 return newRealSetBinder(binder, Key.get(type)); in newSetBinder()
131 public static <T> Multibinder<T> newSetBinder(Binder binder, Class<T> type) { in newSetBinder() argument
132 return newRealSetBinder(binder, Key.get(type)); in newSetBinder()
140 Binder binder, TypeLiteral<T> type, Annotation annotation) { in newSetBinder() argument
141 return newRealSetBinder(binder, Key.get(type, annotation)); in newSetBinder()
149 Binder binder, Class<T> type, Annotation annotation) { in newSetBinder() argument
150 return newRealSetBinder(binder, Key.get(type, annotation)); in newSetBinder()
157 public static <T> Multibinder<T> newSetBinder(Binder binder, TypeLiteral<T> type, in newSetBinder() argument
[all …]
DMapBinder.java46 import com.google.inject.binder.LinkedBindingBuilder;
143 public static <K, V> MapBinder<K, V> newMapBinder(Binder binder, in newMapBinder() argument
145 binder = binder.skipSources(MapBinder.class, RealMapBinder.class); in newMapBinder()
146 return newRealMapBinder(binder, keyType, valueType, Key.get(mapOf(keyType, valueType)), in newMapBinder()
147 Multibinder.newSetBinder(binder, entryOfProviderOf(keyType, valueType))); in newMapBinder()
154 public static <K, V> MapBinder<K, V> newMapBinder(Binder binder, in newMapBinder() argument
156 return newMapBinder(binder, TypeLiteral.get(keyType), TypeLiteral.get(valueType)); in newMapBinder()
163 public static <K, V> MapBinder<K, V> newMapBinder(Binder binder, in newMapBinder() argument
165 binder = binder.skipSources(MapBinder.class, RealMapBinder.class); in newMapBinder()
166 return newRealMapBinder(binder, keyType, valueType, in newMapBinder()
[all …]
DOptionalBinder.java36 import com.google.inject.binder.LinkedBindingBuilder;
194 public static <T> OptionalBinder<T> newOptionalBinder(Binder binder, Class<T> type) { in newOptionalBinder() argument
195 return newRealOptionalBinder(binder, Key.get(type)); in newOptionalBinder()
198 public static <T> OptionalBinder<T> newOptionalBinder(Binder binder, TypeLiteral<T> type) { in newOptionalBinder() argument
199 return newRealOptionalBinder(binder, Key.get(type)); in newOptionalBinder()
202 public static <T> OptionalBinder<T> newOptionalBinder(Binder binder, Key<T> type) { in newOptionalBinder() argument
203 return newRealOptionalBinder(binder, type); in newOptionalBinder()
206 static <T> RealOptionalBinder<T> newRealOptionalBinder(Binder binder, Key<T> type) { in newRealOptionalBinder() argument
207 binder = binder.skipSources(OptionalBinder.class, RealOptionalBinder.class); in newRealOptionalBinder()
208 RealOptionalBinder<T> optionalBinder = new RealOptionalBinder<T>(binder, type); in newRealOptionalBinder()
[all …]
/external/guice/core/src/com/google/inject/util/
DModules.java61 public void configure(Binder binder) {} in configure() argument
125 public void configure(Binder binder) { in configure() argument
126 binder = binder.skipSources(getClass()); in configure()
128 binder.install(module); in configure()
176 Binder baseBinder = binder(); in configure()
195 final Binder binder = baseBinder.skipSources(this.getClass()); in configure() local
206 new ModuleWriter(binder) { in configure() argument
228 new ModuleWriter(binder) { in configure() argument
248 void rewrite(Binder binder, PrivateElements privateElements, Set<Key<?>> keysToSkip) { in configure() argument
249 PrivateBinder privateBinder = binder.withSource(privateElements.getSource()) in configure()
[all …]
/external/guice/core/src/com/google/inject/name/
DNames.java46 public static void bindProperties(Binder binder, Map<String, String> properties) { in bindProperties() argument
47 binder = binder.skipSources(Names.class); in bindProperties()
51 binder.bind(Key.get(String.class, new NamedImpl(key))).toInstance(value); in bindProperties()
60 public static void bindProperties(Binder binder, Properties properties) { in bindProperties() argument
61 binder = binder.skipSources(Names.class); in bindProperties()
67 binder.bind(Key.get(String.class, new NamedImpl(propertyName))).toInstance(value); in bindProperties()
/external/guice/core/src/com/google/inject/internal/
DProviderMethodsModule.java59 Binder binder, Annotation annotation, Key<T> key, InjectionPoint injectionPoint) {
122 public synchronized void configure(Binder binder) { in configure() argument
123 for (ProviderMethod<?> providerMethod : getProviderMethods(binder)) { in configure()
124 providerMethod.configure(binder); in configure()
128 public List<ProviderMethod<?>> getProviderMethods(Binder binder) { in getProviderMethods() argument
142 Optional<Annotation> annotation = isProvider(binder, method); in getProviderMethods()
144 result.add(createProviderMethod(binder, method, annotation.get())); in getProviderMethods()
163 binder.addError( in getProviderMethods()
181 private Optional<Annotation> isProvider(Binder binder, Method method) { in isProvider() argument
190 binder.addError("More than one annotation claimed by %s on method %s." in isProvider()
[all …]
DAbstractBindingBuilder.java51 protected final Binder binder; field in AbstractBindingBuilder
54 public AbstractBindingBuilder(Binder binder, List<Element> elements, Object source, Key<T> key) { in AbstractBindingBuilder() argument
55 this.binder = binder; in AbstractBindingBuilder()
111 binder.addError(IMPLEMENTATION_ALREADY_SET); in checkNotTargetted()
117 binder.addError(ANNOTATION_ALREADY_SPECIFIED); in checkNotAnnotated()
124 binder.addError(SINGLE_INSTANCE_AND_SCOPE); in checkNotScoped()
129 binder.addError(SCOPE_ALREADY_SET); in checkNotScoped()
DExposureBuilder.java22 import com.google.inject.binder.AnnotatedElementBuilder;
30 private final Binder binder; field in ExposureBuilder
34 public ExposureBuilder(Binder binder, Object source, Key<T> key) { in ExposureBuilder() argument
35 this.binder = binder; in ExposureBuilder()
42 binder.addError(AbstractBindingBuilder.ANNOTATION_ALREADY_SPECIFIED); in checkNotAnnotated()
/external/guice/core/src/com/google/inject/spi/
DElements.java38 import com.google.inject.binder.AnnotatedBindingBuilder;
39 import com.google.inject.binder.AnnotatedConstantBindingBuilder;
40 import com.google.inject.binder.AnnotatedElementBuilder;
108 RecordingBinder binder = new RecordingBinder(stage); in getElements() local
110 binder.install(module); in getElements()
112 binder.scanForAnnotatedMethods(); in getElements()
113 for (RecordingBinder child : binder.privateBinders) { in getElements()
118 return Collections.unmodifiableList(binder.elements); in getElements()
129 public void configure(Binder binder) { in configure() argument
131 element.applyTo(binder); in configure()
[all …]
/external/guice/extensions/multibindings/test/com/google/inject/multibindings/
DMapBinderTest.java121 MapBinder.newMapBinder(binder(), String.class, String.class).permitDuplicates(); in testAllBindings()
169 binder(), String.class, String.class); in testMapBinderAggregatesMultipleModules()
178 binder(), String.class, String.class); in testMapBinderAggregatesMultipleModules()
200 binder(), String.class, String.class, Names.named("abc")); in testMapBinderAggregationForAnnotationInstance()
205 binder(), String.class, String.class, Names.named("abc")); in testMapBinderAggregationForAnnotationInstance()
226 binder(), String.class, String.class, Abc.class); in testMapBinderAggregationForAnnotationType()
231 binder(), String.class, String.class, Abc.class); in testMapBinderAggregationForAnnotationType()
252 binder(), String.class, String.class, named("abc")); in testMapBinderWithMultipleAnnotationValueSets()
258 binder(), String.class, String.class, named("de")); in testMapBinderWithMultipleAnnotationValueSets()
287 binder(), String.class, String.class, Abc.class); in testMapBinderWithMultipleAnnotationTypeSets()
[all …]
DMultibinderTest.java106 Multibinder<String> multibinder = Multibinder.newSetBinder(binder(), String.class); in testMultibinderAggregatesMultipleModules()
114 Multibinder<String> multibinder = Multibinder.newSetBinder(binder(), String.class); in testMultibinderAggregatesMultipleModules()
134 = Multibinder.newSetBinder(binder(), String.class, Names.named("abc")); in testMultibinderAggregationForAnnotationInstance()
138 multibinder = Multibinder.newSetBinder(binder(), String.class, Names.named("abc")); in testMultibinderAggregationForAnnotationInstance()
156 = Multibinder.newSetBinder(binder(), String.class, Abc.class); in testMultibinderAggregationForAnnotationType()
160 multibinder = Multibinder.newSetBinder(binder(), String.class, Abc.class); in testMultibinderAggregationForAnnotationType()
178 = Multibinder.newSetBinder(binder(), String.class, named("abc")); in testMultibinderWithMultipleAnnotationValueSets()
184 = Multibinder.newSetBinder(binder(), String.class, named("de")); in testMultibinderWithMultipleAnnotationValueSets()
209 = Multibinder.newSetBinder(binder(), String.class, Abc.class); in testMultibinderWithMultipleAnnotationTypeSets()
215 = Multibinder.newSetBinder(binder(), String.class, De.class); in testMultibinderWithMultipleAnnotationTypeSets()
[all …]
/external/guice/extensions/testlib/src/com/google/inject/testing/fieldbinder/
DBoundFieldModule.java26 import com.google.inject.binder.AnnotatedBindingBuilder;
27 import com.google.inject.binder.LinkedBindingBuilder;
102 private Binder binder; field in BoundFieldModule
304 AnnotatedBindingBuilder<?> annotatedBinder = binder.bind(fieldInfo.boundType); in bindField()
305 LinkedBindingBuilder<?> binder = verifyBindingAnnotations(fieldInfo.field, annotatedBinder); in bindField() local
314 AnnotatedBindingBuilder<Object> binderUnsafe = (AnnotatedBindingBuilder<Object>) binder; in bindField()
350 Preconditions.checkNotNull(binder); in throwBoundFieldException()
359 public void configure(Binder binder) { in configure() argument
360 binder = binder.skipSources(BoundFieldModule.class); in configure()
361 this.binder = binder; in configure()
[all …]
/external/guice/extensions/throwingproviders/src/com/google/inject/throwingproviders/
DCheckedProviderMethodsModule.java70 public synchronized void configure(Binder binder) { in configure() argument
71 for (CheckedProviderMethod<?> throwingProviderMethod : getProviderMethods(binder)) { in configure()
72 throwingProviderMethod.configure(binder); in configure()
76 List<CheckedProviderMethod<?>> getProviderMethods(Binder binder) { in getProviderMethods() argument
82 result.add(createProviderMethod(binder, method, checkedProvides)); in getProviderMethods()
89 <T> CheckedProviderMethod<T> createProviderMethod(Binder binder, final Method method, in createProviderMethod() argument
93 binder = binder.withSource(method); in createProviderMethod()
108 binder.bind(loggerKey).toProvider(new LogProvider(method)); in createProviderMethod()
112 parameterProviders.add(binder.getProvider(key)); in createProviderMethod()
124 binder.addError(message); in createProviderMethod()
DThrowingProviderBinder.java33 import com.google.inject.binder.ScopedBindingBuilder;
94 private final Binder binder; field in ThrowingProviderBinder
96 private ThrowingProviderBinder(Binder binder) { in ThrowingProviderBinder() argument
97 this.binder = binder; in ThrowingProviderBinder()
100 public static ThrowingProviderBinder create(Binder binder) { in create() argument
101 return new ThrowingProviderBinder(binder.skipSources( in create()
200 binder.bind(targetKey).toInstance(target); in to()
218 CheckedProvideUtils.findThrowingConstructor(cxtorLiteral, binder); in providing()
226 binder, cxtorLiteral.getExceptionTypes(cxtor), exceptionTypes, interfaceType); in providing()
229 binder.bind(typeKey).toConstructor((Constructor) cxtor).in(Scopes.NO_SCOPE); in providing()
[all …]
/external/guice/extensions/dagger-adapter/src/com/google/inject/daggeradapter/
DDaggerMethodScanner.java46 Binder binder, Annotation rawAnnotation, Key<T> key, InjectionPoint injectionPoint) { in prepareMethod() argument
54 binder.addError("Map bindings are not yet supported."); in prepareMethod()
56 return processSetBinding(binder, key); in prepareMethod()
58 binder.addError(Type.SET_VALUES.name() + " contributions are not supported by Guice.", in prepareMethod()
62 binder.addError("Unknown @Provides type " + annotation.type() + ".", providesMethod); in prepareMethod()
67 private static <T> Key<T> processSetBinding(Binder binder, Key<T> key) { in processSetBinding() argument
68 Multibinder<T> setBinder = Multibinder.newSetBinder(binder, key.getTypeLiteral()); in processSetBinding()
/external/guice/extensions/servlet/src/com/google/inject/servlet/
DServletsModuleBuilder.java40 private final Binder binder; field in ServletsModuleBuilder
42 public ServletsModuleBuilder(Binder binder) { in ServletsModuleBuilder() argument
43 this.binder = binder; in ServletsModuleBuilder()
92 binder.addError("More than one servlet was mapped to the same URI pattern: " + pattern); in with()
94 binder.bind(Key.get(ServletDefinition.class, UniqueAnnotations.create())).toProvider( in with()
104 binder.bind(servletKey).toInstance(servlet); in with()
DFiltersModuleBuilder.java37 private final Binder binder; field in FiltersModuleBuilder
39 public FiltersModuleBuilder(Binder binder) { in FiltersModuleBuilder() argument
40 this.binder = binder; in FiltersModuleBuilder()
89 binder.bind(FilterDefinition.class).annotatedWith(UniqueAnnotations.create()).toProvider( in through()
98 binder.bind(filterKey).toInstance(filter); in through()
/external/guice/extensions/spring/src/com/google/inject/spring/
DSpringIntegration.java59 public static void bindAll(Binder binder, ListableBeanFactory beanFactory) { in bindAll() argument
60 binder = binder.skipSources(SpringIntegration.class); in bindAll()
64 bindBean(binder, beanFactory, name, type); in bindAll()
68 static <T> void bindBean(Binder binder, ListableBeanFactory beanFactory, in bindBean() argument
76 binder.addError(e); in bindBean()
80 binder.bind(type) in bindBean()

1234567