/external/guice/core/test/com/google/inject/ |
D | OptionalBindingTest.java | 85 Guice.createInjector(everythingModule) in testEverythingInjectorGetInstance() 91 Guice.createInjector(partialModule) in testPartialInjectorGetInstance() 97 Guice.createInjector() in testNothingInjectorGetInstance() 104 Guice.createInjector(everythingModule).injectMembers(instance); in testEverythingInjectorInjectMembers() 110 Guice.createInjector(partialModule).injectMembers(instance); in testPartialInjectorInjectMembers() 116 Guice.createInjector().injectMembers(instance); in testNothingInjectorInjectMembers() 121 Guice.createInjector(everythingModule, toInstanceModule) in testEverythingInjectorToInstance() 127 Guice.createInjector(partialModule, toInstanceModule) in testPartialInjectorToInstance() 133 Guice.createInjector(toInstanceModule) in testNothingInjectorToInstance() 139 Guice.createInjector(everythingModule, toProviderInstanceModule) in testEverythingInjectorToProviderInstance() [all …]
|
D | ProvisionExceptionTest.java | 42 Guice.createInjector().getInstance(A.class); in testExceptionsCollapsed() 59 Guice.createInjector(new AbstractModule() { in testExceptionsCollapsedWithScopes() 77 Guice.createInjector().getInstance(E.class); in testMethodInjectionExceptions() 88 Guice.createInjector(new AbstractModule() { in testBindToProviderInstanceExceptions() 108 Guice.createInjector().getInstance(F.class); in testProvisionExceptionsAreWrappedForBindToType() 118 Guice.createInjector(new AbstractModule() { in testProvisionExceptionsAreWrappedForBindToProviderType() 133 Guice.createInjector(new AbstractModule() { in testProvisionExceptionsAreWrappedForBindToProviderInstance() 148 Guice.createInjector().getInstance(A.class); in testProvisionExceptionIsSerializable() 167 Guice.createInjector().getInstance(G.class); in testMultipleCauses() 181 Injector injector = Guice.createInjector(); in testInjectInnerClass() [all …]
|
D | JitBindingsTest.java | 58 Injector injector = Guice.createInjector(new AbstractModule() { in testLinkedBindingWorks() 74 Injector injector = Guice.createInjector(new AbstractModule() { in testMoreBasicsWork() 92 Injector injector = Guice.createInjector(new AbstractModule() { in testLinkedEagerSingleton() 108 Injector injector = Guice.createInjector(new AbstractModule() { in testBasicsWithEagerSingleton() 126 Injector injector = Guice.createInjector(new AbstractModule() { in testLinkedToScoped() 142 Injector injector = Guice.createInjector(new AbstractModule() { in testBasicsWithScoped() 161 Guice.createInjector(new AbstractModule() { in testFailsIfInjectingScopedDirectlyWhenItIsntBound() 177 Injector injector = Guice.createInjector(new AbstractModule() { in testLinkedProviderBindingWorks() 193 Guice.createInjector(new AbstractModule() { in testJitGetFails() 208 Guice.createInjector(new AbstractModule() { in testJitInjectionFails() [all …]
|
D | ParentInjectorTest.java | 42 Injector parent = Guice.createInjector(bindsA); in testParentAndChildCannotShareExplicitBindings() 54 Injector parent = Guice.createInjector(); in testParentJitBindingWontClobberChildBinding() 70 Injector parent = Guice.createInjector(); in testChildCannotBindToAParentJitBinding() 82 Injector parent = Guice.createInjector(); in testJustInTimeBindingsAreSharedWithParentIfPossible() 94 Injector parent = Guice.createInjector(bindsB); in testBindingsInherited() 100 Injector top = Guice.createInjector(bindsA); in testGetParent() 109 Injector parent = Guice.createInjector(); in testChildBindingsNotVisibleToParent() 119 Injector parent = Guice.createInjector(new AbstractModule() { in testScopesInherited() 141 Injector parent = Guice.createInjector(new AbstractModule() { in testInterceptorsInherited() 159 Injector parent = Guice.createInjector(bindListConverterModule); in testTypeConvertersInherited() [all …]
|
D | InjectorTest.java | 51 Injector injector = Guice.createInjector(Stage.TOOL); in testToStringDoesNotInfinitelyRecurse() 60 Injector injector = Guice.createInjector(new AbstractModule() { in testProviderMethods() 94 return Guice.createInjector(new AbstractModule() { in createFooInjector() 114 Injector injector = Guice.createInjector(new AbstractModule() { 125 Injector injector = Guice.createInjector(); 206 Guice.createInjector(new AbstractModule() { 220 Guice.createInjector(new AbstractModule() { 251 Injector injector = Guice.createInjector(new AbstractModule() { 279 Injector injector = Guice.createInjector(new AbstractModule() { 307 Guice.createInjector(new AbstractModule() { [all …]
|
D | BinderTest.java | 48 private final Logger loggerToWatch = Logger.getLogger(Guice.class.getName()); 75 Guice.createInjector(new Module() { in testProviderFromBinder() 92 Guice.createInjector(new AbstractModule() { in testMissingBindings() 129 Guice.createInjector(new AbstractModule() { in testMissingDependency() 150 Guice.createInjector(new AbstractModule() { in testDanglingConstantBinding() 165 Guice.createInjector(new AbstractModule() { in testRecursiveBinding() 180 Guice.createInjector(new AbstractModule() { in testBindingNullConstant() 197 Guice.createInjector(new AbstractModule() { in testToStringOnBinderApi() 222 Guice.createInjector(new AbstractModule() { in testNothingIsSerializableInBinderApi() 251 Injector injector = Guice.createInjector(new AbstractModule() { in testArrayTypeCanonicalization() [all …]
|
D | CircularDependencyTest.java | 48 Injector injector = Guice.createInjector(new AbstractModule() { in testCircularlyDependentConstructors() 59 Injector injector = Guice.createInjector(new AbstractModule() { in testCircularlyDependentConstructorsWithProviderMethods() 70 Injector injector = Guice.createInjector(new AbstractModule() { in testCircularlyDependentConstructorsWithProviderInstances() 91 Injector injector = Guice.createInjector(new AbstractModule() { in testCircularlyDependentConstructorsWithProviderKeys() 102 Injector injector = Guice.createInjector(); in testCircularlyDependentConstructorsWithProvidedBy() 194 Guice.createInjector().getInstance(C.class); in testUnresolvableCircularDependency() 205 Guice.createInjector(new AbstractModule() { in testUnresolvableCircularDependenciesWithProviderInstances() 220 Guice.createInjector(new AbstractModule() { in testUnresolvableCircularDependenciesWithProviderKeys() 236 Guice.createInjector().getInstance(C2.class); in testUnresolvableCircularDependenciesWithProvidedBy() 277 Guice.createInjector(new AbstractModule() { in testDisabledCircularDependency() [all …]
|
D | RequireAtInjectOnConstructorsTest.java | 31 Guice.createInjector(new AbstractModule() { in testNoCxtors_explicitBinding() 49 Injector injector = Guice.createInjector(new AbstractModule() { in testNoCxtors_jitBinding() 68 Guice.createInjector(new AbstractModule() { in testNoCxtors_implicitBinding() 87 Guice.createInjector(new AbstractModule() { in testNoCxtors_inheritedByPrivateModules() 111 Guice.createInjector(new AbstractModule() { in testNoCxtors_accumulatesAllErrors() 134 Guice.createInjector(new AbstractModule() { in testNoCxtors_separateOptionsForPrivateModules() 161 Guice.createInjector(new AbstractModule() { in testManyConstructorsButNoneWithAtInject() 179 Injector injector = Guice.createInjector(new AbstractModule() { in testRequireAtInjectStillAllowsToConstructorBindings()
|
D | MembersInjectorTest.java | 54 Guice.createInjector(new AbstractModule() { in testMembersInjectorFromBinder() 99 Injector injector = Guice.createInjector(new AbstractModule() { in testMembersInjectorFromInjector() 127 Injector injector = Guice.createInjector(); in testMembersInjectorWithNonInjectedTypes() 137 Injector injector = Guice.createInjector(); in testInjectionFailure() 152 Injector injector = Guice.createInjector(); in testInjectionAppliesToSpecifiedType() 159 InjectsMembersInjector injectsMembersInjector = Guice.createInjector(new AbstractModule() { in testInjectingMembersInjector() 173 Guice.createInjector(new AbstractModule() { in testCannotBindMembersInjector() 185 Guice.createInjector(new AbstractModule() { in testCannotBindMembersInjector() 200 Guice.createInjector().getInstance(InjectsBrokenMembersInjector.class); in testInjectingMembersInjectorWithErrorsInDependencies() 214 Injector injector = Guice.createInjector(new AbstractModule() { in testLookupMembersInjectorBinding() [all …]
|
D | PrivateModuleTest.java | 44 Injector injector = Guice.createInjector(new AbstractModule() { in testBasicUsage() 78 Injector injector = Guice.createInjector(new AbstractModule() { in testWithoutPrivateModules() 98 Guice.createInjector(new AbstractModule() { in testMisplacedExposedAnnotation() 116 Guice.createInjector(new AbstractModule() { in testMisplacedExposeStatement() 130 Injector injector = Guice.createInjector(new AbstractModule() { in testPrivateModulesAndProvidesMethods() 179 Guice.createInjector(new AbstractModule() { in testCannotBindAKeyExportedByASibling() 206 Guice.createInjector(new AbstractModule() { in testExposeButNoBind() 232 Guice.createInjector( in testMessagesFromPrivateModulesAreNicelyIntegrated() 258 Injector injector = Guice.createInjector(new PrivateModule() { in testNestedPrivateInjectors() 275 Injector injector = Guice.createInjector(new PrivateModule() { in testInstallingRegularModulesFromPrivateModules() [all …]
|
D | ImplicitBindingTest.java | 34 Injector injector = Guice.createInjector(); in testCircularDependency() 52 Injector injector = Guice.createInjector(); in testDefaultImplementation() 71 Injector injector = Guice.createInjector(); in testDefaultProvider() 77 Injector injector = Guice.createInjector(new AbstractModule() { in testBindingOverridesImplementedBy() 93 Guice.createInjector().getInstance(Key.get(I.class, Names.named("i"))); in testNoImplicitBindingIsCreatedForAnnotatedKeys() 122 Injector injector = Guice.createInjector(new AbstractModule() { in testCircularJitBindingsLeaveNoResidue() 246 Injector parentSetupRootInjector = Guice.createInjector(testModule); in testInstancesRequestingProvidersForThemselvesWithChildInjectors() 254 Injector childSetupRootInjector = Guice.createInjector(); in testInstancesRequestingProvidersForThemselvesWithChildInjectors() 309 Injector injector = Guice.createInjector(); in testRecursiveJitBindingsCleanupCorrectly() 348 NonEmptyEnum cardSuit = Guice.createInjector().getInstance(NonEmptyEnum.class); in testProvidedByNonEmptyEnum() [all …]
|
D | RequestInjectionTest.java | 52 Guice.createInjector(new AbstractModule() { in testInjectMembers() 68 Guice.createInjector(new AbstractModule() { in testInjectStatics() 84 Guice.createInjector(new AbstractModule() { in testInjectMembersAndStatics() 102 Guice.createInjector(new AbstractModule() { in testValidationErrorOnInjectedMembers() 117 Guice.createInjector(new AbstractModule() { in testInjectionErrorOnInjectedMembers() 138 Guice.createInjector(new AbstractModule() { in testUserExceptionWhileInjectingInstance() 154 Guice.createInjector(new AbstractModule() { in testUserExceptionWhileInjectingStatically() 205 Injector injector = Guice.createInjector(new AbstractModule() { in testEarlyInjectableReferencesWithSameIdentity()
|
D | TypeLiteralInjectionTest.java | 37 Guice.createInjector(new AbstractModule() { in testBindingToRawTypeLiteralIsNotAllowed() 51 Guice.createInjector(new AbstractModule() { in testBindingToParameterizedTypeLiteralIsNotAllowed() 65 C c = Guice.createInjector().getInstance(C.class); in testInjectTypeLiteralWithRawTypes() 70 Guice.createInjector().getInstance(B.class); in testInjectTypeLiteralWithRawTypes() 79 B<Integer> b = Guice.createInjector().getInstance(new Key<B<Integer>>() {}); in testInjectTypeLiteralWithClassTypes() 88 Guice.createInjector().getInstance(TypeLiteral.class); in testInjectRawTypeLiteral()
|
D | DuplicateBindingsTest.java | 53 Injector injector = Guice.createInjector( in testDuplicateBindingsAreIgnored() 84 Guice.createInjector(new FailingProviderModule(), new FailingProviderModule()); in testProviderMethodsFailIfInstancesDiffer() 96 Guice.createInjector( in testSameScopeInstanceIgnored() 101 Guice.createInjector( in testSameScopeInstanceIgnored() 108 Guice.createInjector( in testSameScopeAnnotationIgnored() 115 Guice.createInjector( in testMixedAnnotationAndScopeForSingletonIgnored() 122 Guice.createInjector( in testMixedScopeAndUnscopedIgnored() 130 Guice.createInjector( in testMixedScopeFails() 158 Guice.createInjector( in testMixedTargetsFails() 179 Guice.createInjector(new ThrowingModule(), new ThrowingModule()); in testExceptionInEqualsThrowsCreationException() [all …]
|
D | LoggerInjectionTest.java | 21 Injector injector = Guice.createInjector(); in testLoggerWithMember() 27 Injector injector = Guice.createInjector(); in testLoggerInConstructor() 41 Injector injector = Guice.createInjector(); in testLoggerWithoutMember() 49 Injector injector = Guice.createInjector(new AbstractModule() { in testCanBindAnnotatedLogger() 62 Guice.createInjector(new AbstractModule() { in testCannotBindLogger()
|
/external/guice/extensions/testlib/test/com/google/inject/testing/fieldbinder/ |
D | BoundFieldModuleTest.java | 25 import com.google.inject.Guice; 49 Guice.createInjector(module); in testBindingNothing() 61 Injector injector = Guice.createInjector(module); in testBindingOnePrivate() 73 Injector injector = Guice.createInjector(module); in testBindingOnePublic() 96 Injector injector = Guice.createInjector(module); in testSuperTypeBinding() 110 Injector injector = Guice.createInjector(module); in testBindingTwo() 123 Injector injector = Guice.createInjector(module); in testBindingSuperType() 135 Injector injector = Guice.createInjector(module); in testBindingSuperTypeAccessSubType() 159 Guice.createInjector(module); in testBindingIncorrectTypeProviderFails() 184 Injector injector = Guice.createInjector(module); in testBindingWithBindingAnnotation() [all …]
|
/external/guice/ |
D | README.md | 1 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/ |
D | ProviderMethodsTest.java | 31 import com.google.inject.Guice; 73 Injector injector = Guice.createInjector(this); in testProviderMethods() 202 Guice.createInjector(new AbstractModule() { 223 Injector injector = Guice.createInjector( 262 Injector injector = Guice.createInjector((Module) new AbstractModule() { 292 Injector injector = Guice.createInjector(installsSelf); 300 Injector injector = Guice.createInjector(new AbstractModule() { 336 Injector injector = Guice.createInjector(module); 362 Injector injector = Guice.createInjector(module); 384 Guice.createInjector(new AbstractModule() { [all …]
|
D | ModuleAnnotatedMethodScannerTest.java | 31 import com.google.inject.Guice; 63 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testScanning() 88 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testSkipSources() 102 Injector injector = Guice.createInjector(module, NamedMunger.module()); in testWithSource() 115 Guice.createInjector(module, NamedMunger.module()); in testMoreThanOneClaimedAnnotationFails() 174 Guice.createInjector(new SomeModule(), FailingScanner.module()); 218 Injector parent = Guice.createInjector(NamedMunger.module()); 238 Injector parent = Guice.createInjector(); 249 Injector injector = Guice.createInjector(NamedMunger.module(), new PrivateModule() { 260 Injector injector = Guice.createInjector(NamedMunger.module(), new PrivateModule() { [all …]
|
/external/guice/extensions/throwingproviders/test/com/google/inject/throwingproviders/ |
D | ThrowingProviderTest.java | 29 import com.google.inject.Guice; 67 private Injector bindInjector = Guice.createInjector(new AbstractModule() { 82 private Injector providesInjector = Guice.createInjector(new AbstractModule() { 219 bindInjector = Guice.createInjector(new AbstractModule() { in testAnnotations_Bind() 237 providesInjector = Guice.createInjector(new AbstractModule() { in testAnnotations_Provides() 302 bindInjector = Guice.createInjector(new AbstractModule() { in testThrowingProviderSubclassing() 318 Guice.createInjector(new AbstractModule() { in testBindingToNonInterfaceType_Bind() 334 Guice.createInjector(new AbstractModule() { in testBindingToNonInterfaceType_Provides() 354 bindInjector = Guice.createInjector(new AbstractModule() { in testBindingToSubSubInterface_Bind() 369 Guice.createInjector(new AbstractModule() { in testBindingToSubSubInterface_Provides() [all …]
|
D | CheckedProviderTest.java | 31 import com.google.inject.Guice; 98 bindInjector = Guice.createInjector(new AbstractModule() { in setUp() 116 providesInjector = Guice.createInjector(new AbstractModule() { in setUp() 140 cxtorInjector = Guice.createInjector(new AbstractModule() { in setUp() 302 bindInjector = Guice.createInjector(new AbstractModule() { in testAnnotations_Bind() 321 providesInjector = Guice.createInjector(new AbstractModule() { in testAnnotations_Provides() 355 cxtorInjector = Guice.createInjector(new AbstractModule() { in testAnnotations_Cxtor() 416 bindInjector = Guice.createInjector(new AbstractModule() { in testThrowingProviderSubclassing() 433 Guice.createInjector(new AbstractModule() { in testBindingToNonInterfaceType_Bind() 450 Guice.createInjector(new AbstractModule() { in testBindingToNonInterfaceType_Provides() [all …]
|
/external/guice/extensions/assistedinject/test/com/google/inject/assistedinject/ |
D | FactoryModuleBuilderTest.java | 27 import com.google.inject.Guice; 57 Guice.createInjector(new AbstractModule() { in testImplicitForwardingAssistedBindingFailsWithInterface() 77 Guice.createInjector(new AbstractModule() { in testImplicitForwardingAssistedBindingFailsWithAbstractClass() 97 Injector injector = Guice.createInjector(new AbstractModule() { in testImplicitForwardingAssistedBindingCreatesNewObjects() 113 Guice.createInjector(new AbstractModule() { in testExplicitForwardingAssistedBindingFailsWithInterface() 136 Guice.createInjector(new AbstractModule() { in testExplicitForwardingAssistedBindingFailsWithAbstractClass() 159 Injector injector = Guice.createInjector(new AbstractModule() { in testExplicitForwardingAssistedBindingCreatesNewObjects() 175 Injector injector = Guice.createInjector(new AbstractModule() { in testAnnotatedAndParentBoundReturnValue() 194 Injector injector = Guice.createInjector(new AbstractModule() { in testParentBoundReturnValue() 210 Injector injector = Guice.createInjector(new AbstractModule() { in testConfigureAnnotatedReturnValue() [all …]
|
D | FactoryProvider2Test.java | 25 import com.google.inject.Guice; 51 Injector injector = Guice.createInjector(new AbstractModule() { in testAssistedFactory() 71 Injector injector = Guice.createInjector(new AbstractModule() { in testAssistedFactoryWithAnnotations() 134 Injector injector = Guice.createInjector(new AbstractModule() { in testFactoryUsesInjectedConstructor() 170 Injector injector = Guice.createInjector(new AbstractModule() { in testConstructorDoesntNeedAllFactoryMethodArguments() 192 Injector injector = Guice.createInjector(new AbstractModule() { in testMethodsAndFieldsGetInjected() 229 Injector injector = Guice.createInjector(new AbstractModule() { in testProviderInjection() 256 Injector injector = Guice.createInjector(new AbstractModule() { in testAssistedProviderInjection() 289 Injector injector = Guice.createInjector(new AbstractModule() { in testTypeTokenInjection() 321 Injector injector = Guice.createInjector(new AbstractModule() { in testTypeTokenProviderInjection() [all …]
|
D | ManyConstructorsTest.java | 22 import com.google.inject.Guice; 33 Injector injector = Guice.createInjector(new AbstractModule() { in testTwoConstructors() 49 Injector injector = Guice.createInjector(new AbstractModule() { in testDifferentOrderParameters() 68 Injector injector = Guice.createInjector(new AbstractModule() { in testInterfaceToImpl() 86 Injector injector = Guice.createInjector(new AbstractModule() { in testUsingOneConstructor() 97 injector = Guice.createInjector(new AbstractModule() { in testUsingOneConstructor() 111 Guice.createInjector(new AbstractModule() { in testTooManyMatchingConstructors() 129 Guice.createInjector(new AbstractModule() { in testNoMatchingConstructorsBecauseTooManyParams() 145 Guice.createInjector(new AbstractModule() { in testNoMatchingConstrucotsBecauseTooLittleParams() 230 Injector injector = Guice.createInjector(new AbstractModule() { in testDependenciesAndOtherAnnotations()
|
/external/guice/jdk8-tests/test/com/google/inject/jdk8/ |
D | Java8LanguageFeatureBindingTest.java | 21 import com.google.inject.Guice; 49 Injector injector = Guice.createInjector(new AbstractModule() { in testBinding_lambdaToInterface() 62 Injector injector = Guice.createInjector(new AbstractModule() { in testProviderMethod_returningLambda() 77 Injector injector = Guice.createInjector(new AbstractModule() { in testProviderMethod_containingLambda_throwingException() 101 Guice.createInjector(new AbstractModule() { in testProvider_usingJdk8Features() 113 Injector injector = Guice.createInjector(new AbstractModule() { in testProvider_usingJdk8Features() 141 Injector injector = Guice.createInjector(new AbstractModule() { in testBinding_toProvider_lambda() 154 Injector injector = Guice.createInjector(new AbstractModule() { in testBinding_toProvider_methodReference()
|