/external/guice/core/test/com/google/inject/ |
D | PrivateModuleTest.java | 46 bind(String.class).annotatedWith(named("a")).toInstance("public"); in testBasicUsage() 50 bind(String.class).annotatedWith(named("b")).toInstance("i"); in testBasicUsage() 52 bind(AB.class).annotatedWith(named("one")).to(AB.class); in testBasicUsage() 53 expose(AB.class).annotatedWith(named("one")); in testBasicUsage() 59 bind(String.class).annotatedWith(named("b")).toInstance("ii"); in testBasicUsage() 61 bind(AB.class).annotatedWith(named("two")).to(AB.class); in testBasicUsage() 62 expose(AB.class).annotatedWith(named("two")); in testBasicUsage() 81 bindA.bind(String.class).annotatedWith(named("a")).toInstance("i"); in testWithoutPrivateModules() 82 bindA.expose(String.class).annotatedWith(named("a")); in testWithoutPrivateModules() 83 bindA.bind(String.class).annotatedWith(named("c")).toInstance("private to A"); in testWithoutPrivateModules() [all …]
|
D | TypeConversionTest.java | 79 bindConstant().annotatedWith(NumericValue.class).to("5"); in testOneConstantInjection() 95 bindConstant().annotatedWith(NumericValue.class).to("5"); in testConstantInjection() 96 bindConstant().annotatedWith(BooleanValue.class).to("true"); in testConstantInjection() 97 bindConstant().annotatedWith(EnumValue.class).to("TEE"); in testConstantInjection() 98 bindConstant().annotatedWith(ClassName.class).to(Foo.class.getName()); in testConstantInjection() 128 bindConstant().annotatedWith(NumericValue.class).to("5"); in testConstantInjectionWithExplicitBindingsRequired() 129 bindConstant().annotatedWith(BooleanValue.class).to("true"); in testConstantInjectionWithExplicitBindingsRequired() 130 bindConstant().annotatedWith(EnumValue.class).to("TEE"); in testConstantInjectionWithExplicitBindingsRequired() 131 bindConstant().annotatedWith(ClassName.class).to(Foo.class.getName()); in testConstantInjectionWithExplicitBindingsRequired() 170 bindConstant().annotatedWith(NumericValue.class).to("invalid"); in configure() [all …]
|
D | BinderTest.java | 98 bind(Date.class).annotatedWith(Names.named("date")); in testMissingBindings() 183 bindConstant().annotatedWith(Names.named("nullOne")).to(none); in testBindingNullConstant() 184 bind(String.class).annotatedWith(Names.named("nullTwo")).toInstance(none); in testBindingNullConstant() 207 bind(Integer.class).annotatedWith(Names.named("a")).toString()); in testToStringOnBinderApi() 210 bindConstant().annotatedWith(Names.named("b")).toString()); in testToStringOnBinderApi() 229 assertNotSerializable(bind(Integer.class).annotatedWith(Names.named("a"))); in testNothingIsSerializableInBinderApi() 231 assertNotSerializable(bindConstant().annotatedWith(Names.named("b"))); in testNothingIsSerializableInBinderApi() 487 bind(AbstractModule.class).annotatedWith(red) in configure() 489 bind(Binder.class).annotatedWith(red).toProvider(Providers.<Binder>of(null)); in configure() 490 bind(Binding.class).annotatedWith(red).toProvider(Providers.<Binding>of(null)); in configure() [all …]
|
D | RequestInjectionTest.java | 55 bindConstant().annotatedWith(ForMethod.class).to("test"); in testInjectMembers() 56 bindConstant().annotatedWith(ForField.class).to(5); in testInjectMembers() 71 bindConstant().annotatedWith(ForMethod.class).to("test"); in testInjectStatics() 72 bindConstant().annotatedWith(ForField.class).to(5); in testInjectStatics() 87 bindConstant().annotatedWith(ForMethod.class).to("test"); in testInjectMembersAndStatics() 88 bindConstant().annotatedWith(ForField.class).to(5); in testInjectMembersAndStatics()
|
D | BindingAnnotationTest.java | 37 bindConstant().annotatedWith(Blue.class).to("foo"); in testAnnotationWithValueMatchesKeyWithTypeOnly() 53 bindConstant().annotatedWith(Blue.class).to("foo"); in testRequireExactAnnotationsDisablesFallback() 71 bindConstant().annotatedWith(Red.class).to("foo"); in testRequireExactAnnotationsDoesntBreakIfDefaultsExist() 83 bindConstant().annotatedWith(Color.class).to("foo"); in testRequireExactAnnotationsRequireAllOptionals() 101 bindConstant().annotatedWith(createBlue(6)).to("six"); in testAnnotationWithValueThatDoesntMatch()
|
D | DuplicateBindingsTest.java | 418 bind(Foo.class).annotatedWith(named("instance")).toInstance(foo); in configure() 421 bind(Foo.class).annotatedWith(named("pInstance")).toProvider(pFoo); in configure() 424 bind(Foo.class).annotatedWith(named("pKey")).toProvider(pclFoo); in configure() 427 bind(Foo.class).annotatedWith(named("linkedKey")).to(clFoo); in configure() 433 bind(Foo.class).annotatedWith(named("constructor")).toConstructor(cFoo); in configure() 454 bind(Foo.class).annotatedWith(named("pInstance")).toProvider(pFoo).in(scope); in configure() 457 bind(Foo.class).annotatedWith(named("pKey")).toProvider(pclFoo).in(scope); in configure() 460 bind(Foo.class).annotatedWith(named("linkedKey")).to(clFoo).in(scope); in configure() 466 bind(Foo.class).annotatedWith(named("constructor")).toConstructor(cFoo).in(scope); in configure() 483 bind(Foo.class).annotatedWith(named("pInstance")).toProvider(pFoo).in(scope); in configure() [all …]
|
D | ProviderInjectionTest.java | 123 bind(Count.class).annotatedWith(named("a")).toInstance(new Count(0) { in testCreationTimeInjectionOrdering() 130 bind(Count.class).annotatedWith(named("b")).toProvider(new Provider<Count>() { in testCreationTimeInjectionOrdering() 141 bind(Count.class).annotatedWith(named("c")).toInstance(new Count(0) { in testCreationTimeInjectionOrdering() 151 bind(Count.class).annotatedWith(named("d")).toInstance(new Count(8)); in testCreationTimeInjectionOrdering() 152 bind(Count.class).annotatedWith(named("e")).toInstance(new Count(16)); in testCreationTimeInjectionOrdering()
|
D | InjectorTest.java | 64 .annotatedWith(Other.class) in testProviderMethods() 98 bindConstant().annotatedWith(S.class).to("test"); in createFooInjector() 99 bindConstant().annotatedWith(I.class).to(5); in createFooInjector() 116 bindConstant().annotatedWith(I.class).to(5); 208 bindConstant().annotatedWith(S.class).to("test"); 209 bindConstant().annotatedWith(I.class).to(5);
|
/external/guice/extensions/grapher/test/com/google/inject/grapher/demo/ |
D | BackToTheFutureModule.java | 36 bind(EnergySource.class).annotatedWith(Nuclear.class).to(Plutonium.class); in configure() 37 bind(EnergySource.class).annotatedWith(Renewable.class).to(Lightning.class); in configure() 40 bind(PinballParts.class).annotatedWith(Used.class).toInstance(new PinballParts()); in configure() 42 bind(Person.class).annotatedWith(Driver.class).to(MartyMcFly.class).in(Singleton.class); in configure() 43 bind(Person.class).annotatedWith(Inventor.class).to(DocBrown.class).in(Singleton.class); in configure() 45 bindConstant().annotatedWith(Names.named("year")).to("1955"); in configure()
|
/external/guice/core/test/com/google/inject/matcher/ |
D | MatcherTest.java | 21 import static com.google.inject.matcher.Matchers.annotatedWith; 79 assertTrue(annotatedWith(Foo.class).matches(Bar.class)); in testAnnotatedWith() 80 assertFalse(annotatedWith(Foo.class).matches( in testAnnotatedWith() 82 assertEquals("annotatedWith(Foo.class)", annotatedWith(Foo.class).toString()); in testAnnotatedWith() 83 assertEqualsBothWays(annotatedWith(Foo.class), annotatedWith(Foo.class)); in testAnnotatedWith() 84 assertFalse(annotatedWith(Foo.class).equals(annotatedWith(Named.class))); in testAnnotatedWith() 87 annotatedWith(Baz.class); in testAnnotatedWith() 154 assertEqualWhenReserialized(annotatedWith(Named.class)); in testSerialization() 155 assertEqualWhenReserialized(annotatedWith(Names.named("foo"))); in testSerialization()
|
/external/guice/extensions/persist/src/com/google/inject/persist/ |
D | PersistModule.java | 19 import static com.google.inject.matcher.Matchers.annotatedWith; 44 bindInterceptor(annotatedWith(Transactional.class), any(), getTransactionInterceptor()); in configure() 46 bindInterceptor(any(), annotatedWith(Transactional.class), getTransactionInterceptor()); in configure()
|
/external/guice/core/test/com/google/inject/spi/ |
D | ElementsTest.java | 160 bindConstant().annotatedWith(SampleAnnotation.class).to("A"); in testBindConstantAnnotations() 161 bindConstant().annotatedWith(Names.named("Bee")).to("B"); in testBindConstantAnnotations() 189 bindConstant().annotatedWith(Names.named("String")).to("A"); in testBindConstantTypes() 190 bindConstant().annotatedWith(Names.named("int")).to(2); in testBindConstantTypes() 191 bindConstant().annotatedWith(Names.named("long")).to(3L); in testBindConstantTypes() 192 bindConstant().annotatedWith(Names.named("boolean")).to(false); in testBindConstantTypes() 193 bindConstant().annotatedWith(Names.named("double")).to(5.0d); in testBindConstantTypes() 194 bindConstant().annotatedWith(Names.named("float")).to(6.0f); in testBindConstantTypes() 195 bindConstant().annotatedWith(Names.named("short")).to((short) 7); in testBindConstantTypes() 196 bindConstant().annotatedWith(Names.named("char")).to('h'); in testBindConstantTypes() [all …]
|
D | SpiBindingsTest.java | 59 bindConstant().annotatedWith(Names.named("one")).to(1); in testBindConstant() 223 bindConstant().annotatedWith(Names.named("one")).to(1); in testConstantBinding() 247 bindConstant().annotatedWith(Names.named("one")).to("1"); in testConvertedConstantBinding() 290 bind(String.class).annotatedWith(Names.named("a")) in testScopes() 292 bind(String.class).annotatedWith(Names.named("b")) in testScopes() 294 bind(String.class).annotatedWith(Names.named("c")) in testScopes() 296 bind(String.class).annotatedWith(Names.named("d")) in testScopes()
|
/external/guice/core/test/com/googlecode/guice/ |
D | Jsr330Test.java | 82 bind(B.class).annotatedWith(Names.named("jodie")).toInstance(b); in testQualifiedInject() 83 bind(C.class).annotatedWith(Red.class).toInstance(c); in testQualifiedInject() 84 bind(D.class).annotatedWith(RED).toInstance(d); in testQualifiedInject() 85 bind(E.class).annotatedWith(Names.named("jesse")).toInstance(e); in testQualifiedInject() 100 bind(B.class).annotatedWith(Names.named("jodie")).toInstance(b); in testProviderInject() 102 bind(D.class).annotatedWith(RED).toInstance(d); in testProviderInject() 245 bind(B.class).annotatedWith(Names.named("1")).toProvider(BProvider.class); in testBindProviderClass() 246 bind(B.class).annotatedWith(Names.named("2")).toProvider(Key.get(BProvider.class)); in testBindProviderClass() 247 bind(B.class).annotatedWith(Names.named("3")).toProvider(TypeLiteral.get(BProvider.class)); in testBindProviderClass()
|
/external/guice/core/src/com/google/inject/binder/ |
D | AnnotatedElementBuilder.java | 32 void annotatedWith(Class<? extends Annotation> annotationType); in annotatedWith() method 37 void annotatedWith(Annotation annotation); in annotatedWith() method
|
D | AnnotatedConstantBindingBuilder.java | 31 ConstantBindingBuilder annotatedWith( in annotatedWith() method 37 ConstantBindingBuilder annotatedWith(Annotation annotation); in annotatedWith() method
|
D | AnnotatedBindingBuilder.java | 31 LinkedBindingBuilder<T> annotatedWith( in annotatedWith() method 37 LinkedBindingBuilder<T> annotatedWith(Annotation annotation); in annotatedWith() method
|
/external/guice/jdk8-tests/test/com/google/inject/jdk8/ |
D | DefaultMethodInterceptionTest.java | 82 bindInterceptor(Matchers.any(), Matchers.annotatedWith(InterceptMe.class), in testInterceptedDefaultMethod() 98 bindInterceptor(Matchers.any(), Matchers.annotatedWith(InterceptMe.class), in testInterceptedDefaultMethod_calledByAnotherMethod() 126 bindInterceptor(Matchers.any(), Matchers.annotatedWith(InterceptMe.class), in testInterceptedDefaultMethod_whenParentClassDefinesNonInterceptedMethod() 161 bindInterceptor(Matchers.any(), Matchers.annotatedWith(InterceptMe.class), in testInterceptedDefaultMethod_whenParentClassDefinesInterceptedMethod()
|
/external/guice/extensions/grapher/src/com/google/inject/grapher/graphviz/ |
D | GraphvizModule.java | 31 .annotatedWith(Graphviz.class) in configure() 34 .annotatedWith(Graphviz.class) in configure()
|
/external/guice/extensions/jmx/test/com/google/inject/tools/jmx/ |
D | JmxTest.java | 56 .annotatedWith(Transactional.class) in configure() 58 bindConstant().annotatedWith(Names.named("port")).to(8080); in configure()
|
/external/guice/core/src/com/google/inject/internal/ |
D | ExposureBuilder.java | 46 public void annotatedWith(Class<? extends Annotation> annotationType) { in annotatedWith() method in ExposureBuilder 52 public void annotatedWith(Annotation annotation) { in annotatedWith() method in ExposureBuilder
|
D | ConstantBindingBuilderImpl.java | 44 public ConstantBindingBuilder annotatedWith(Class<? extends Annotation> annotationType) { in annotatedWith() method in ConstantBindingBuilderImpl 49 public ConstantBindingBuilder annotatedWith(Annotation annotation) { in annotatedWith() method in ConstantBindingBuilderImpl
|
/external/guice/extensions/assistedinject/test/com/google/inject/assistedinject/ |
D | ExtensionSpiTest.java | 173 bind(String.class).annotatedWith(named("catName1")).toInstance("kitty1"); in configure() 174 bind(String.class).annotatedWith(named("catName2")).toInstance("kitty2"); in configure() 175 bind(String.class).annotatedWith(named("petName")).toInstance("pussy"); in configure() 176 bind(Integer.class).annotatedWith(named("age")).toInstance(12); in configure()
|
D | FactoryProviderTest.java | 94 bind(int.class).annotatedWith(Names.named("horsePower")).toInstance(250); in testAssistedFactoryWithAnnotations() 95 bind(int.class).annotatedWith(Names.named("modelYear")).toInstance(1984); in testAssistedFactoryWithAnnotations() 607 bind(int.class).annotatedWith(Names.named("horsePower")).toInstance(250); in testGenericAssistedFactory() 608 bind(int.class).annotatedWith(Names.named("modelYear")).toInstance(1984); in testGenericAssistedFactory() 680 bind(Double.class).annotatedWith(Names.named("lowLimit")).toInstance(50000.0d); in testAssistedFactoryForConcreteType() 681 bind(Double.class).annotatedWith(Names.named("highLimit")).toInstance(100000.0d); in testAssistedFactoryForConcreteType() 719 bind(Double.class).annotatedWith(Names.named("lowLimit")).toInstance(50000.0d); in testAssistedFactoryForParameterizedType() 720 bind(Double.class).annotatedWith(Names.named("highLimit")).toInstance(100000.0d); in testAssistedFactoryForParameterizedType()
|
/external/guice/extensions/servlet/test/com/google/inject/servlet/ |
D | ScopeRequestIntegrationTest.java | 62 bindConstant().annotatedWith(Names.named(SomeObject.INVALID)).to(SHOULDNEVERBESEEN); in testNonHttpRequestScopedCallable() 95 bindConstant().annotatedWith(Names.named(SomeObject.INVALID)).to(SHOULDNEVERBESEEN); in testWrongValueClasses() 113 bindConstant().annotatedWith(Names.named(SomeObject.INVALID)).to(SHOULDNEVERBESEEN); in testNullReplacement()
|