Home
last modified time | relevance | path

Searched refs:injector (Results 1 – 25 of 192) sorted by relevance

12345678

/external/libchrome/base/message_loop/
Dmessage_pump_glib_unittest.cc32 source_->injector = this; in EventInjector()
97 EventInjector* injector; member
114 *timeout_ms = static_cast<Source*>(source)->injector->HandlePrepare(); in Prepare()
119 return static_cast<Source*>(source)->injector->HandleCheck(); in Check()
125 static_cast<Source*>(source)->injector->HandleDispatch(); in Dispatch()
148 void ExpectProcessedEvents(EventInjector* injector, int count) { in ExpectProcessedEvents() argument
149 EXPECT_EQ(injector->processed_events(), count); in ExpectProcessedEvents()
176 EventInjector* injector() const { return injector_; } in injector() function in base::__anon7686a22e0111::MessagePumpGLibTest
191 EXPECT_EQ(0, injector()->processed_events()); in TEST_F()
193 injector()->Reset(); in TEST_F()
[all …]
/external/guice/core/src/com/google/inject/internal/
DInjectorShell.java55 private final InjectorImpl injector; field in InjectorShell
57 private InjectorShell(Builder builder, List<Element> elements, InjectorImpl injector) { in InjectorShell() argument
59 this.injector = injector; in InjectorShell()
63 return injector; in getInjector()
145 InjectorImpl injector = new InjectorImpl(parent, state, options); in build() local
147 privateElements.initInjector(injector); in build()
152 TypeConverterBindingProcessor.prepareBuiltInConverters(injector); in build()
157 new MessageProcessor(errors).process(injector, elements); in build()
160 new InterceptorBindingProcessor(errors).process(injector, elements); in build()
164 new ListenerBindingProcessor(errors).process(injector, elements); in build()
[all …]
DTypeConverterBindingProcessor.java44 static void prepareBuiltInConverters(InjectorImpl injector) { in prepareBuiltInConverters() argument
46 convertToPrimitiveType(injector, int.class, Integer.class); in prepareBuiltInConverters()
47 convertToPrimitiveType(injector, long.class, Long.class); in prepareBuiltInConverters()
48 convertToPrimitiveType(injector, boolean.class, Boolean.class); in prepareBuiltInConverters()
49 convertToPrimitiveType(injector, byte.class, Byte.class); in prepareBuiltInConverters()
50 convertToPrimitiveType(injector, short.class, Short.class); in prepareBuiltInConverters()
51 convertToPrimitiveType(injector, float.class, Float.class); in prepareBuiltInConverters()
52 convertToPrimitiveType(injector, double.class, Double.class); in prepareBuiltInConverters()
54 convertToClass(injector, Character.class, new TypeConverter() { in prepareBuiltInConverters()
68 convertToClasses(injector, Matchers.subclassesOf(Enum.class), new TypeConverter() { in prepareBuiltInConverters()
[all …]
/external/guice/core/test/com/google/inject/
DImplicitBindingTest.java34 Injector injector = Guice.createInjector(); in testCircularDependency() local
35 Foo foo = injector.getInstance(Foo.class); in testCircularDependency()
52 Injector injector = Guice.createInjector(); in testDefaultImplementation() local
53 I i = injector.getInstance(I.class); in testDefaultImplementation()
71 Injector injector = Guice.createInjector(); in testDefaultProvider() local
72 Provided provided = injector.getInstance(Provided.class); in testDefaultProvider()
77 Injector injector = Guice.createInjector(new AbstractModule() { in testBindingOverridesImplementedBy() local
83 assertEquals(AlternateImpl.class, injector.getInstance(I.class).getClass()); in testBindingOverridesImplementedBy()
122 Injector injector = Guice.createInjector(new AbstractModule() { in testCircularJitBindingsLeaveNoResidue() local
131 Binding v1 = injector.getBinding(Valid.class); in testCircularJitBindingsLeaveNoResidue()
[all …]
DJitBindingsTest.java58 Injector injector = Guice.createInjector(new AbstractModule() { in testLinkedBindingWorks() local
66 ensureWorks(injector, Foo.class); in testLinkedBindingWorks()
70 ensureFails(injector, ALLOW_BINDING, FooImpl.class); in testLinkedBindingWorks()
74 Injector injector = Guice.createInjector(new AbstractModule() { in testMoreBasicsWork() local
84 ensureWorks(injector, FooBar.class, Bar.class, Foo.class); in testMoreBasicsWork()
88 ensureFails(injector, ALLOW_BINDING, FooImpl.class); in testMoreBasicsWork()
92 Injector injector = Guice.createInjector(new AbstractModule() { in testLinkedEagerSingleton() local
100 ensureWorks(injector, Foo.class); in testLinkedEagerSingleton()
104 ensureFails(injector, ALLOW_BINDING, FooImpl.class); in testLinkedEagerSingleton()
108 Injector injector = Guice.createInjector(new AbstractModule() { in testBasicsWithEagerSingleton() local
[all …]
DScopesTest.java88 Injector injector = Guice.createInjector(singletonsModule); in testSingletons() local
91 injector.getInstance(BoundAsSingleton.class), in testSingletons()
92 injector.getInstance(BoundAsSingleton.class)); in testSingletons()
95 injector.getInstance(AnnotatedSingleton.class), in testSingletons()
96 injector.getInstance(AnnotatedSingleton.class)); in testSingletons()
99 injector.getInstance(EagerSingleton.class), in testSingletons()
100 injector.getInstance(EagerSingleton.class)); in testSingletons()
103 injector.getInstance(LinkedSingleton.class), in testSingletons()
104 injector.getInstance(LinkedSingleton.class)); in testSingletons()
107 injector.getInstance(JustInTimeSingleton.class), in testSingletons()
[all …]
DLoggerInjectionTest.java21 Injector injector = Guice.createInjector(); in testLoggerWithMember() local
22 injector.injectMembers(this); in testLoggerWithMember()
27 Injector injector = Guice.createInjector(); in testLoggerInConstructor() local
28 Foo foo = injector.getInstance(Foo.class); in testLoggerInConstructor()
41 Injector injector = Guice.createInjector(); in testLoggerWithoutMember() local
42 assertNull(injector.getInstance(Logger.class).getName()); in testLoggerWithoutMember()
43 assertNull(injector.getProvider(Logger.class).get().getName()); in testLoggerWithoutMember()
44 assertNull(injector.getBinding(Logger.class).getProvider().get().getName()); in testLoggerWithoutMember()
45 assertEquals("Provider<Logger>", injector.getProvider(Logger.class).toString()); in testLoggerWithoutMember()
49 Injector injector = Guice.createInjector(new AbstractModule() { in testCanBindAnnotatedLogger() local
[all …]
DTypeListenerTest.java115 Injector injector = Guice.createInjector(new AbstractModule() { in testInstallingInjectionListener() local
128 Object a1 = injector.getInstance(A.class); in testInstallingInjectionListener()
131 Object a2 = injector.getInstance(A.class); in testInstallingInjectionListener()
134 Object b1 = injector.getInstance(B.class); in testInstallingInjectionListener()
137 Provider<A> aProvider = injector.getProvider(A.class); in testInstallingInjectionListener()
158 Injector injector = Guice.createInjector(new AbstractModule() {
173 C c = injector.getInstance(C.class);
209 Injector injector = Guice.createInjector(new AbstractModule() {
215 injector.getProvider(B.class);
227 injector.getInstance(B.class);
[all …]
DInjectorTest.java51 Injector injector = Guice.createInjector(Stage.TOOL); in testToStringDoesNotInfinitelyRecurse() local
52 injector.toString(); in testToStringDoesNotInfinitelyRecurse()
53 injector.getBinding(Injector.class).toString(); in testToStringDoesNotInfinitelyRecurse()
60 Injector injector = Guice.createInjector(new AbstractModule() { in testProviderMethods() local
70 injector.getInstance(Key.get(SampleSingleton.class))); in testProviderMethods()
71 assertSame(singleton, injector.getInstance(SampleSingleton.class)); in testProviderMethods()
74 injector.getInstance(Key.get(SampleSingleton.class, Other.class))); in testProviderMethods()
80 Injector injector = createFooInjector(); in testInjection() local
81 Foo foo = injector.getInstance(Foo.class); in testInjection()
105 Injector injector = createFooInjector();
[all …]
DBindingTest.java127 Injector injector = Guice.createInjector(new AbstractModule() { in testScopeIsAppliedToKeyNotTarget() local
134 assertNotSame(injector.getInstance(Integer.class), injector.getInstance(Number.class)); in testScopeIsAppliedToKeyNotTarget()
230 Injector injector = Guice.createInjector(new AbstractModule() { in testToConstructorBinding() local
236 D d = (D) injector.getInstance(Object.class); in testToConstructorBinding()
245 Injector injector = Guice.createInjector(new AbstractModule() { in testToConstructorBindingsOnParameterizedTypes() local
252 C<Stage> one = (C<Stage>) injector.getInstance(s); in testToConstructorBindingsOnParameterizedTypes()
257 C<Injector> two = (C<Injector>) injector.getInstance(i); in testToConstructorBindingsOnParameterizedTypes()
259 assertEquals(injector, two.t); in testToConstructorBindingsOnParameterizedTypes()
260 assertEquals(injector, two.anotherT); in testToConstructorBindingsOnParameterizedTypes()
293 Injector injector = Guice.createInjector(new AbstractModule() { in testToConstructorAndMethodInterceptors() local
[all …]
/external/guice/extensions/persist/test/com/google/inject/persist/jpa/
DManagedLocalTransactionsAcrossRequestTest.java42 private Injector injector; field in ManagedLocalTransactionsAcrossRequestTest
51 injector = Guice.createInjector(new JpaPersistModule("testUnit")); in setUp()
54 injector.getInstance(PersistService.class).start(); in setUp()
59 injector.getInstance(EntityManagerFactory.class).close(); in tearDown()
63 injector.getInstance(TransactionalObject.class).runOperationInTxn(); in testSimpleTransaction()
65 EntityManager em = injector.getInstance(EntityManager.class); in testSimpleTransaction()
71 injector.getInstance(UnitOfWork.class).end(); in testSimpleTransaction()
77 injector.getInstance(UnitOfWork.class).end(); in testSimpleTransaction()
82 EntityManager emOrig = injector.getInstance(EntityManager.class); in testSimpleTransactionWithMerge()
83 JpaTestEntity entity = injector.getInstance(TransactionalObject.class) in testSimpleTransactionWithMerge()
[all …]
DManagedLocalTransactionsTest.java40 private Injector injector; field in ManagedLocalTransactionsTest
47 injector = Guice.createInjector(new JpaPersistModule("testUnit")); in setUp()
50 injector.getInstance(PersistService.class).start(); in setUp()
55 injector.getInstance(UnitOfWork.class).end(); in tearDown()
56 injector.getInstance(EntityManagerFactory.class).close(); in tearDown()
60 injector.getInstance(TransactionalObject.class).runOperationInTxn(); in testSimpleTransaction()
62 EntityManager em = injector.getInstance(EntityManager.class); in testSimpleTransaction()
68 injector.getInstance(UnitOfWork.class).end(); in testSimpleTransaction()
77 JpaTestEntity entity = injector.getInstance(TransactionalObject.class) in testSimpleTransactionWithMerge()
80 EntityManager em = injector.getInstance(EntityManager.class); in testSimpleTransactionWithMerge()
[all …]
DJpaWorkManagerTest.java40 private Injector injector; field in JpaWorkManagerTest
46 injector = Guice.createInjector(new JpaPersistModule("testUnit")); in setUp()
49 injector.getInstance(PersistService.class).start(); in setUp()
55 injector.getInstance(EntityManagerFactory.class).close(); in tearDown()
62 injector.getInstance(UnitOfWork.class).begin(); in testWorkManagerInSession()
64 injector.getInstance(TransactionalObject.class).runOperationInTxn(); in testWorkManagerInSession()
66 injector.getInstance(UnitOfWork.class).end(); in testWorkManagerInSession()
70 injector.getInstance(UnitOfWork.class).begin(); in testWorkManagerInSession()
71 injector.getInstance(EntityManager.class).getTransaction().begin(); in testWorkManagerInSession()
73 final Query query = injector.getInstance(EntityManager.class) in testWorkManagerInSession()
[all …]
DJoiningLocalTransactionsTest.java40 private Injector injector; field in JoiningLocalTransactionsTest
48 injector = Guice.createInjector(new JpaPersistModule("testUnit")); in setUp()
51 injector.getInstance(PersistService.class).start(); in setUp()
57 injector.getInstance(UnitOfWork.class).end(); in tearDown()
58 injector.getInstance(EntityManagerFactory.class).close(); in tearDown()
62 injector.getInstance(JoiningLocalTransactionsTest.TransactionalObject.class) in testSimpleTransaction()
65 EntityManager em = injector.getInstance(EntityManager.class); in testSimpleTransaction()
72 injector.getInstance(UnitOfWork.class).end(); in testSimpleTransaction()
82 injector.getInstance(JoiningLocalTransactionsTest.TransactionalObject.class) in testSimpleTransactionRollbackOnChecked()
86 injector.getInstance(UnitOfWork.class).end(); in testSimpleTransactionRollbackOnChecked()
[all …]
DEntityManagerPerRequestProvisionTest.java38 private Injector injector; field in EntityManagerPerRequestProvisionTest
42 injector = Guice.createInjector(new JpaPersistModule("testUnit")); in setUp()
45 injector.getInstance(PersistService.class).start(); in setUp()
47 injector.getInstance(UnitOfWork.class).begin(); in setUp()
52 injector.getInstance(UnitOfWork.class).end(); in tearDown()
53 injector.getInstance(EntityManagerFactory.class).close(); in tearDown()
58 JpaDao dao = injector.getInstance(JpaDao.class); in testEntityManagerLifecyclePerTxn()
67 injector.getInstance(EntityManager.class), JpaDao.em); in testEntityManagerLifecyclePerTxn()
70 dao = injector.getInstance(JpaDao.class); in testEntityManagerLifecyclePerTxn()
78 JpaDao dao = injector.getInstance(JpaDao.class); in testEntityManagerLifecyclePerTxn2()
[all …]
DManualLocalTransactionsTest.java41 private Injector injector; field in ManualLocalTransactionsTest
46 injector = Guice.createInjector(new JpaPersistModule("testUnit")); in setUp()
49 injector.getInstance(PersistService.class).start(); in setUp()
53 injector.getInstance(EntityManagerFactory.class).close(); in tearDown()
57 injector.getInstance(UnitOfWork.class).begin(); in testSimpleCrossTxnWork()
60 EntityManager em = injector.getInstance(EntityManager.class); in testSimpleCrossTxnWork()
62 JpaTestEntity entity = injector.getInstance(TransactionalObject.class).runOperationInTxn(); in testSimpleCrossTxnWork()
63 injector.getInstance(TransactionalObject.class).runOperationInTxn2(); in testSimpleCrossTxnWork()
67 injector.getInstance(EntityManager.class).contains(entity)); in testSimpleCrossTxnWork()
71 injector.getInstance(UnitOfWork.class).end(); in testSimpleCrossTxnWork()
[all …]
/external/guice/extensions/testlib/test/com/google/inject/testing/fieldbinder/
DBoundFieldModuleTest.java61 Injector injector = Guice.createInjector(module); in testBindingOnePrivate() local
63 assertEquals(testValue, injector.getInstance(Integer.class)); in testBindingOnePrivate()
73 Injector injector = Guice.createInjector(module); in testBindingOnePublic() local
75 assertEquals(testValue, injector.getInstance(Integer.class)); in testBindingOnePublic()
96 Injector injector = Guice.createInjector(module); in testSuperTypeBinding() local
98 assertEquals(instance.anInt, injector.getInstance(Integer.class)); in testSuperTypeBinding()
110 Injector injector = Guice.createInjector(module); in testBindingTwo() local
112 assertEquals(testValue, injector.getInstance(Integer.class)); in testBindingTwo()
113 assertEquals(testString, injector.getInstance(String.class)); in testBindingTwo()
123 Injector injector = Guice.createInjector(module); in testBindingSuperType() local
[all …]
/external/guice/extensions/multibindings/test/com/google/inject/multibindings/
DOptionalBinderTest.java153 Injector injector = Guice.createInjector(module); in testOptionalIsAbsentByDefault() local
154 Optional<String> optional = injector.getInstance(Key.get(optionalOfString)); in testOptionalIsAbsentByDefault()
157 Optional<Provider<String>> optionalP = injector.getInstance(Key.get(optionalOfProviderString)); in testOptionalIsAbsentByDefault()
161 injector.getInstance(Key.get(optionalOfJavaxProviderString)); in testOptionalIsAbsentByDefault()
167 optional = toOptional(injector.getInstance(Key.get(javaOptionalOfString))); in testOptionalIsAbsentByDefault()
170 optionalP = toOptional(injector.getInstance(Key.get(javaOptionalOfProviderString))); in testOptionalIsAbsentByDefault()
173 optionalJxP = toOptional(injector.getInstance(Key.get(javaOptionalOfJavaxProviderString))); in testOptionalIsAbsentByDefault()
186 Injector injector = Guice.createInjector(module); in testUsesUserBoundValue() local
187 assertEquals("foo", injector.getInstance(String.class)); in testUsesUserBoundValue()
189 Optional<String> optional = injector.getInstance(Key.get(optionalOfString)); in testUsesUserBoundValue()
[all …]
/external/guice/extensions/servlet/test/com/google/inject/servlet/
DFilterDefinitionTest.java41 Injector injector = createMock(Injector.class); in testFilterInitAndConfig() local
48 expect(injector.getBinding(Key.get(Filter.class))) in testFilterInitAndConfig()
51 expect(injector.getInstance(Key.get(Filter.class))) in testFilterInitAndConfig()
55 replay(binding, injector); in testFilterInitAndConfig()
72 filterDef.init(servletContext, injector, Sets.<Filter>newIdentityHashSet()); in testFilterInitAndConfig()
88 verify(binding, injector, servletContext); in testFilterInitAndConfig()
92 Injector injector = createMock(Injector.class); in testFilterCreateDispatchDestroy() local
100 expect(injector.getBinding(Key.get(Filter.class))) in testFilterCreateDispatchDestroy()
103 expect(injector.getInstance(Key.get(Filter.class))) in testFilterCreateDispatchDestroy()
112 replay(injector, binding, request); in testFilterCreateDispatchDestroy()
[all …]
DServletTest.java88 Injector injector = Guice.createInjector(new AbstractModule() { in testScopeExceptions() local
98 injector.getInstance(String.class); in testScopeExceptions()
105 injector.getInstance(Integer.class); in testScopeExceptions()
113 injector.getInstance(key); in testScopeExceptions()
121 final Injector injector = createInjector(); in testRequestAndResponseBindings() local
132 assertSame(request, injector.getInstance(ServletRequest.class)); in testRequestAndResponseBindings()
133 assertSame(request, injector.getInstance(HTTP_REQ_KEY)); in testRequestAndResponseBindings()
136 assertSame(response, injector.getInstance(ServletResponse.class)); in testRequestAndResponseBindings()
137 assertSame(response, injector.getInstance(HTTP_RESP_KEY)); in testRequestAndResponseBindings()
139 assertSame(servletRequest.getParameterMap(), injector.getInstance(REQ_PARAMS_KEY)); in testRequestAndResponseBindings()
[all …]
/external/guice/extensions/spring/test/com/google/inject/spring/
DSpringIntegrationTest.java51 Injector injector = Guice.createInjector(new AbstractModule() { in testBindFromSpring() local
61 assertNotNull(injector.getInstance(Singleton.class)); in testBindFromSpring()
62 assertSame(injector.getInstance(Singleton.class), in testBindFromSpring()
63 injector.getInstance(Singleton.class)); in testBindFromSpring()
65 assertNotNull(injector.getInstance(Prototype.class)); in testBindFromSpring()
66 assertNotSame(injector.getInstance(Prototype.class), in testBindFromSpring()
67 injector.getInstance(Prototype.class)); in testBindFromSpring()
82 Injector injector = Guice.createInjector(new AbstractModule() { in testBindAll() local
93 assertNotNull(injector.getInstance(singletonKey)); in testBindAll()
94 assertSame(injector.getInstance(singletonKey), in testBindAll()
[all …]
/external/guice/core/test/com/googlecode/guice/
DJsr330Test.java62 Injector injector = Guice.createInjector(new AbstractModule() { in testInject() local
72 A a = injector.getInstance(A.class); in testInject()
80 Injector injector = Guice.createInjector(new AbstractModule() { in testQualifiedInject() local
90 F f = injector.getInstance(F.class); in testQualifiedInject()
98 Injector injector = Guice.createInjector(new AbstractModule() { in testProviderInject() local
108 G g = injector.getInstance(G.class); in testProviderInject()
118 Injector injector = Guice.createInjector(new AbstractModule() { in testScopeAnnotation() local
126 B b = injector.getInstance(B.class); in testScopeAnnotation()
127 assertSame(b, injector.getInstance(B.class)); in testScopeAnnotation()
128 assertSame(b, injector.getInstance(B.class)); in testScopeAnnotation()
[all …]
/external/guice/core/test/com/google/inject/spi/
DModuleAnnotatedMethodScannerTest.java63 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testScanning() local
66 assertMungedBinding(injector, String.class, "foo", "foo"); in testScanning()
67 assertMungedBinding(injector, String.class, "foo2", "foo2"); in testScanning()
69 Binding<String> fooBinding = injector.getBinding(Key.get(String.class, named("foo-munged"))); in testScanning()
70 Binding<String> foo2Binding = injector.getBinding(Key.get(String.class, named("foo2-munged"))); in testScanning()
88 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testSkipSources() local
89 assertMungedBinding(injector, String.class, "foo", "foo"); in testSkipSources()
102 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testWithSource() local
103 assertMungedBinding(injector, String.class, "foo", "foo"); in testWithSource()
165 private void assertMungedBinding(Injector injector, Class<?> clazz, String originalName,
[all …]
DProviderMethodsTest.java73 Injector injector = Guice.createInjector(this); in testProviderMethods() local
75 Bob bob = injector.getInstance(Bob.class); in testProviderMethods()
78 Bob clone = injector.getInstance(Bob.class); in testProviderMethods()
86 injector.getInstance(soleBobKey), in testProviderMethods()
87 injector.getInstance(soleBobKey) in testProviderMethods()
223 Injector injector = Guice.createInjector(
226 assertEquals("A", injector.getInstance(Key.get(String.class, Names.named("First"))));
227 assertEquals("B", injector.getInstance(Key.get(String.class, Names.named("Second"))));
229 injector.getInstance(Key.get(Types.setOf(String.class))));
231 assertEquals(1, injector.getInstance(Key.get(Integer.class, Names.named("First"))).intValue());
[all …]
/external/droiddriver/src/io/appium/droiddriver/util/
DEvents.java91 private static void injectEvent(InputInjector injector, InputEvent event) { in injectEvent() argument
92 injectEvent(Log.DEBUG, injector, event); in injectEvent()
95 private static void injectEvent(int priority, InputInjector injector, InputEvent event) { in injectEvent() argument
96 Logs.call(priority, injector, "injectInputEvent", event); in injectEvent()
98 if (!injector.injectInputEvent(event)) { in injectEvent()
108 public static long touchDown(InputInjector injector, int x, int y) { in touchDown() argument
111 injectEvent(injector, downEvent); in touchDown()
115 public static void touchUp(InputInjector injector, long downTime, int x, int y) { in touchUp() argument
116 injectEvent(injector, newTouchUpEvent(downTime, x, y)); in touchUp()
119 public static void touchMove(InputInjector injector, long downTime, int x, int y) { in touchMove() argument
[all …]

12345678