Home
last modified time | relevance | path

Searched refs:Guice (Results 1 – 25 of 151) sorted by relevance

1234567

/external/guice/extensions/testlib/test/com/google/inject/testing/fieldbinder/
DBoundFieldModuleTest.java25 import com.google.inject.Guice;
46 Guice.createInjector(module); in testBindingNothing()
59 Injector injector = Guice.createInjector(module); in testBindingOnePrivate()
72 Injector injector = Guice.createInjector(module); in testBindingOnePublic()
95 Injector injector = Guice.createInjector(module); in testSuperTypeBinding()
110 Injector injector = Guice.createInjector(module); in testBindingTwo()
125 Injector injector = Guice.createInjector(module); in testBindingSuperType()
139 Injector injector = Guice.createInjector(module); in testBindingSuperTypeAccessSubType()
166 Guice.createInjector(module); in testBindingIncorrectTypeProviderFails()
190 Injector injector = Guice.createInjector(module); in testBindingWithBindingAnnotation()
[all …]
/external/guice/core/test/com/google/inject/
DOptionalBindingTest.java89 Guice.createInjector(everythingModule) in testEverythingInjectorGetInstance()
95 Guice.createInjector(partialModule) in testPartialInjectorGetInstance()
101 Guice.createInjector().getInstance(HasOptionalInjections.class).assertNothingInjected(); in testNothingInjectorGetInstance()
106 Guice.createInjector(everythingModule).injectMembers(instance); in testEverythingInjectorInjectMembers()
112 Guice.createInjector(partialModule).injectMembers(instance); in testPartialInjectorInjectMembers()
118 Guice.createInjector().injectMembers(instance); in testNothingInjectorInjectMembers()
123 Guice.createInjector(everythingModule, toInstanceModule) in testEverythingInjectorToInstance()
129 Guice.createInjector(partialModule, toInstanceModule) in testPartialInjectorToInstance()
135 Guice.createInjector(toInstanceModule) in testNothingInjectorToInstance()
141 Guice.createInjector(everythingModule, toProviderInstanceModule) in testEverythingInjectorToProviderInstance()
[all …]
DProvisionExceptionTest.java41 Guice.createInjector().getInstance(A.class); in testExceptionsCollapsed()
60 Guice.createInjector( in testExceptionsCollapsedWithScopes()
83 Guice.createInjector().getInstance(E.class); in testMethodInjectionExceptions()
96 Guice.createInjector( in testBindToProviderInstanceExceptions()
120 Guice.createInjector().getInstance(F.class); in testProvisionExceptionsAreWrappedForBindToType()
132 Guice.createInjector( in testProvisionExceptionsAreWrappedForBindToProviderType()
154 Guice.createInjector( in testProvisionExceptionsAreWrappedForBindToProviderInstance()
174 Guice.createInjector().getInstance(A.class); in testProvisionExceptionIsSerializable()
196 Guice.createInjector( in testMultipleCauses()
225 Injector injector = Guice.createInjector(); in testInjectInnerClass()
[all …]
DJitBindingsTest.java58 Guice.createInjector( in testLinkedBindingWorks()
76 Guice.createInjector( in testMoreBasicsWork()
96 Guice.createInjector( in testLinkedEagerSingleton()
114 Guice.createInjector( in testBasicsWithEagerSingleton()
134 Guice.createInjector( in testLinkedToScoped()
152 Guice.createInjector( in testBasicsWithScoped()
172 Guice.createInjector( in testFailsIfInjectingScopedDirectlyWhenItIsntBound()
190 Guice.createInjector( in testLinkedProviderBindingWorks()
207 Guice.createInjector( in testJitGetFails()
224 Guice.createInjector( in testJitInjectionFails()
[all …]
DParentInjectorTest.java38 Injector parent = Guice.createInjector(bindsA); in testParentAndChildCannotShareExplicitBindings()
58 Injector parent = Guice.createInjector(); in testParentJitBindingWontClobberChildBinding()
75 Injector parent = Guice.createInjector(); in testChildCannotBindToAParentJitBinding()
90 Injector parent = Guice.createInjector(); in testJustInTimeBindingsAreSharedWithParentIfPossible()
102 Injector parent = Guice.createInjector(bindsB); in testBindingsInherited()
108 Injector top = Guice.createInjector(bindsA); in testGetParent()
117 Injector parent = Guice.createInjector(); in testChildBindingsNotVisibleToParent()
128 Guice.createInjector( in testScopesInherited()
157 Guice.createInjector( in testInterceptorsInherited()
182 Injector parent = Guice.createInjector(bindListConverterModule); in testTypeConvertersInherited()
[all …]
DCircularDependencyTest.java46 Guice.createInjector( in testCircularlyDependentConstructors()
59 Guice.createInjector( in testCircularlyDependentConstructorsWithProviderMethods()
78 Guice.createInjector( in testCircularlyDependentConstructorsWithProviderInstances()
110 Guice.createInjector( in testCircularlyDependentConstructorsWithProviderKeys()
122 Injector injector = Guice.createInjector(); in testCircularlyDependentConstructorsWithProvidedBy()
235 Guice.createInjector().getInstance(C.class); in testUnresolvableCircularDependency()
247 Guice.createInjector( in testUnresolvableCircularDependenciesWithProviderInstances()
272 Guice.createInjector( in testUnresolvableCircularDependenciesWithProviderKeys()
292 Guice.createInjector().getInstance(C2.class); in testUnresolvableCircularDependenciesWithProvidedBy()
346 Guice.createInjector( in testDisabledCircularDependency()
[all …]
DInjectorTest.java50 Injector injector = Guice.createInjector(Stage.TOOL); in testToStringDoesNotInfinitelyRecurse()
60 Guice.createInjector( in testProviderMethods()
92 return Guice.createInjector( in createFooInjector()
114 Guice.createInjector(
127 Injector injector = Guice.createInjector();
214 Guice.createInjector(
230 Guice.createInjector(
266 Guice.createInjector(
297 Guice.createInjector(
327 Guice.createInjector(
[all …]
DBinderTest.java44 private final Logger loggerToWatch = Logger.getLogger(Guice.class.getName());
76 Guice.createInjector( in testProviderFromBinder()
98 Guice.createInjector( in testMissingBindings()
159 Guice.createInjector( in testMissingDependency()
185 Guice.createInjector( in testDanglingConstantBinding()
203 Guice.createInjector( in testRecursiveBinding()
222 Guice.createInjector( in testBindingNullConstant()
242 Guice.createInjector( in testToStringOnBinderApi()
272 Guice.createInjector( in testNothingIsSerializableInBinderApi()
303 Guice.createInjector( in testArrayTypeCanonicalization()
[all …]
DRequireAtInjectOnConstructorsTest.java30 Guice.createInjector( in testNoCxtors_explicitBinding()
53 Guice.createInjector( in testNoCxtors_jitBinding()
75 Guice.createInjector( in testNoCxtors_implicitBinding()
98 Guice.createInjector( in testNoCxtors_inheritedByPrivateModules()
127 Guice.createInjector( in testNoCxtors_accumulatesAllErrors()
156 Guice.createInjector( in testNoCxtors_separateOptionsForPrivateModules()
188 Guice.createInjector( in testManyConstructorsButNoneWithAtInject()
211 Guice.createInjector( in testRequireAtInjectStillAllowsToConstructorBindings()
DMembersInjectorTest.java64 Guice.createInjector( in testMembersInjectorFromBinder()
114 Guice.createInjector( in testMembersInjectorFromInjector()
144 Injector injector = Guice.createInjector(); in testMembersInjectorWithNonInjectedTypes()
154 Injector injector = Guice.createInjector(); in testInjectionFailure()
170 Injector injector = Guice.createInjector(); in testInjectionAppliesToSpecifiedType()
178 Guice.createInjector( in testInjectingMembersInjector()
195 Guice.createInjector( in testCannotBindMembersInjector()
210 Guice.createInjector( in testCannotBindMembersInjector()
228 Guice.createInjector().getInstance(InjectsBrokenMembersInjector.class); in testInjectingMembersInjectorWithErrorsInDependencies()
244 Guice.createInjector( in testLookupMembersInjectorBinding()
[all …]
DRequestInjectionTest.java50 Guice.createInjector( in testInjectMembers()
67 Guice.createInjector( in testInjectStatics()
84 Guice.createInjector( in testInjectMembersAndStatics()
103 Guice.createInjector( in testValidationErrorOnInjectedMembers()
122 Guice.createInjector( in testInjectionErrorOnInjectedMembers()
149 Guice.createInjector( in testUserExceptionWhileInjectingInstance()
167 Guice.createInjector( in testUserExceptionWhileInjectingStatically()
225 Guice.createInjector( in testEarlyInjectableReferencesWithSameIdentity()
DImplicitBindingTest.java31 Injector injector = Guice.createInjector(); in testCircularDependency()
50 Injector injector = Guice.createInjector(); in testDefaultImplementation()
71 Injector injector = Guice.createInjector(); in testDefaultProvider()
78 Guice.createInjector( in testBindingOverridesImplementedBy()
95 Guice.createInjector().getInstance(Key.get(I.class, Names.named("i"))); in testNoImplicitBindingIsCreatedForAnnotatedKeys()
136 Guice.createInjector( in testCircularJitBindingsLeaveNoResidue()
280 Injector parentSetupRootInjector = Guice.createInjector(testModule); in testInstancesRequestingProvidersForThemselvesWithChildInjectors()
290 Injector childSetupRootInjector = Guice.createInjector(); in testInstancesRequestingProvidersForThemselvesWithChildInjectors()
346 Injector injector = Guice.createInjector(); in testRecursiveJitBindingsCleanupCorrectly()
388 NonEmptyEnum cardSuit = Guice.createInjector().getInstance(NonEmptyEnum.class); in testProvidedByNonEmptyEnum()
[all …]
DPrivateModuleTest.java42 Guice.createInjector( in testBasicUsage()
83 Guice.createInjector( in testWithoutPrivateModules()
105 Guice.createInjector( in testMisplacedExposedAnnotation()
127 Guice.createInjector( in testMisplacedExposeStatement()
147 Guice.createInjector( in testPrivateModulesAndProvidesMethods()
211 Guice.createInjector( in testCannotBindAKeyExportedByASibling()
247 Guice.createInjector( in testExposeButNoBind()
278 Guice.createInjector( in testMessagesFromPrivateModulesAreNicelyIntegrated()
310 Guice.createInjector( in testNestedPrivateInjectors()
332 Guice.createInjector( in testInstallingRegularModulesFromPrivateModules()
[all …]
DTypeLiteralInjectionTest.java35 Guice.createInjector( in testBindingToRawTypeLiteralIsNotAllowed()
52 Guice.createInjector( in testBindingToParameterizedTypeLiteralIsNotAllowed()
69 C c = Guice.createInjector().getInstance(C.class); in testInjectTypeLiteralWithRawTypes()
74 Guice.createInjector().getInstance(B.class); in testInjectTypeLiteralWithRawTypes()
86 B<Integer> b = Guice.createInjector().getInstance(new Key<B<Integer>>() {}); in testInjectTypeLiteralWithClassTypes()
95 Guice.createInjector().getInstance(TypeLiteral.class); in testInjectRawTypeLiteral()
DBindingTest.java60 Guice.createInjector( in testExplicitCyclicDependency()
123 Guice.createInjector( in testBindToUnboundLinkedBinding()
142 Guice.createInjector( in testScopeIsAppliedToKeyNotTarget()
214 assertNotNull(Guice.createInjector().getInstance(clazz)); in assertBindingSucceeds()
219 Guice.createInjector().getInstance(clazz); in assertBindingFails()
230 Guice.createInjector().getInstance(TooManyConstructors.class); in testTooManyConstructors()
253 Guice.createInjector( in testToConstructorBinding()
271 Guice.createInjector( in testToConstructorBindingsOnParameterizedTypes()
295 Guice.createInjector( in testToConstructorBindingsFailsOnRawTypes()
326 Guice.createInjector( in testToConstructorAndMethodInterceptors()
[all …]
DLoggerInjectionTest.java19 Injector injector = Guice.createInjector(); in testLoggerWithMember()
25 Injector injector = Guice.createInjector(); in testLoggerInConstructor()
41 Injector injector = Guice.createInjector(); in testLoggerWithoutMember()
50 Guice.createInjector( in testCanBindAnnotatedLogger()
65 Guice.createInjector( in testCannotBindLogger()
/external/guice/
DREADME.md1 Guice chapter
12 Put simply, Guice alleviates the need for factories and the use of new in your Java code. Think of
14 Guice embraces Java's type safe nature, especially when it comes to features introduced in Java 5 s…
16 Guice helps you design better APIs, and the Guice API itself sets a good example. Guice is not a ki…
18 Guice aims to make development and debugging easier and faster, not harder and slower. In that vein…
20 For an introduction to Guice and a comparison to new and the factory pattern, see [Bob Lee's video …
22 We've been running Guice in mission critical applications since 2006, and now you can, too. We hope…
/external/guice/core/test/com/google/inject/spi/
DModuleAnnotatedMethodScannerTest.java31 import com.google.inject.Guice;
65 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testScanning()
98 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testSkipSources()
120 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testWithSource()
135 Guice.createInjector(module, NamedMunger.module()); in testMoreThanOneClaimedAnnotationFails()
203 Guice.createInjector(new SomeModule(), FailingScanner.module());
250 Injector parent = Guice.createInjector(NamedMunger.module());
274 Injector parent = Guice.createInjector();
286 Guice.createInjector(
304 Guice.createInjector(
[all …]
DProviderMethodsTest.java31 import com.google.inject.Guice;
71 Injector injector = Guice.createInjector(this); in testProviderMethods()
149 Guice.createInjector(
205 Guice.createInjector(
233 Guice.createInjector(new ProvideTs<String>("A", "B") {}, new ProvideTs<Integer>(1, 2) {});
274 Guice.createInjector(
311 Injector injector = Guice.createInjector(installsSelf);
320 Guice.createInjector(
368 Injector injector = Guice.createInjector(module);
401 Injector injector = Guice.createInjector(module);
[all …]
/external/guice/extensions/throwingproviders/test/com/google/inject/throwingproviders/
DThrowingProviderTest.java29 import com.google.inject.Guice;
68 Guice.createInjector(
86 Guice.createInjector(
225 Guice.createInjector( in testAnnotations_Bind()
246 Guice.createInjector( in testAnnotations_Provides()
313 Guice.createInjector( in testThrowingProviderSubclassing()
330 Guice.createInjector( in testBindingToNonInterfaceType_Bind()
349 Guice.createInjector( in testBindingToNonInterfaceType_Provides()
373 Guice.createInjector( in testBindingToSubSubInterface_Bind()
392 Guice.createInjector( in testBindingToSubSubInterface_Provides()
[all …]
DCheckedProviderTest.java30 import com.google.inject.Guice;
99 Guice.createInjector( in setUp()
118 Guice.createInjector( in setUp()
143 Guice.createInjector( in setUp()
304 Guice.createInjector( in testAnnotations_Bind()
325 Guice.createInjector( in testAnnotations_Provides()
361 Guice.createInjector( in testAnnotations_Cxtor()
422 Guice.createInjector( in testThrowingProviderSubclassing()
439 Guice.createInjector( in testBindingToNonInterfaceType_Bind()
458 Guice.createInjector( in testBindingToNonInterfaceType_Provides()
[all …]
/external/guice/jdk8-tests/test/com/google/inject/jdk8/
DJava8LanguageFeatureBindingTest.java21 import com.google.inject.Guice;
48 Guice.createInjector( in testBinding_lambdaToInterface()
63 Guice.createInjector( in testProviderMethod_returningLambda()
78 Guice.createInjector( in testProviderMethod_containingLambda_throwingException()
101 Guice.createInjector( in testProvider_usingJdk8Features()
115 Guice.createInjector( in testProvider_usingJdk8Features()
143 Guice.createInjector( in testBinding_toProvider_lambda()
158 Guice.createInjector( in testBinding_toProvider_methodReference()
/external/guice/extensions/assistedinject/test/com/google/inject/assistedinject/
DFactoryModuleBuilderTest.java27 import com.google.inject.Guice;
61 Guice.createInjector( in testImplicitForwardingAssistedBindingFailsWithInterface()
83 Guice.createInjector( in testImplicitForwardingAssistedBindingFailsWithAbstractClass()
106 Guice.createInjector( in testImplicitForwardingAssistedBindingCreatesNewObjects()
128 Guice.createInjector( in testExplicitForwardingAssistedBindingFailsWithInterface()
154 Guice.createInjector( in testExplicitForwardingAssistedBindingFailsWithAbstractClass()
181 Guice.createInjector( in testExplicitForwardingAssistedBindingCreatesNewObjects()
206 Guice.createInjector( in testAnnotatedAndParentBoundReturnValue()
229 Guice.createInjector( in testParentBoundReturnValue()
249 Guice.createInjector( in testConfigureAnnotatedReturnValue()
[all …]
DFactoryProvider2Test.java25 import com.google.inject.Guice;
59 Guice.createInjector( in testAssistedFactory()
81 Guice.createInjector( in testAssistedFactoryWithAnnotations()
146 Guice.createInjector( in testFactoryUsesInjectedConstructor()
184 Guice.createInjector( in testConstructorDoesntNeedAllFactoryMethodArguments()
209 Guice.createInjector( in testMethodsAndFieldsGetInjected()
249 Guice.createInjector( in testProviderInjection()
279 Guice.createInjector( in testAssistedProviderInjection()
316 Guice.createInjector( in testTypeTokenInjection()
352 Guice.createInjector( in testTypeTokenProviderInjection()
[all …]
DManyConstructorsTest.java22 import com.google.inject.Guice;
31 Guice.createInjector( in testTwoConstructors()
49 Guice.createInjector( in testDifferentOrderParameters()
70 Guice.createInjector( in testInterfaceToImpl()
91 Guice.createInjector( in testUsingOneConstructor()
104 Guice.createInjector( in testUsingOneConstructor()
119 Guice.createInjector( in testTooManyMatchingConstructors()
143 Guice.createInjector( in testNoMatchingConstructorsBecauseTooManyParams()
163 Guice.createInjector( in testNoMatchingConstrucotsBecauseTooLittleParams()
264 Guice.createInjector( in testDependenciesAndOtherAnnotations()

1234567