Home
last modified time | relevance | path

Searched refs:annotatedWith (Results 1 – 25 of 70) sorted by relevance

123

/external/guice/core/test/com/google/inject/
DPrivateModuleTest.java46 bind(String.class).annotatedWith(named("a")).toInstance("public"); in testBasicUsage()
52 bind(String.class).annotatedWith(named("b")).toInstance("i"); in testBasicUsage()
54 bind(AB.class).annotatedWith(named("one")).to(AB.class); in testBasicUsage()
55 expose(AB.class).annotatedWith(named("one")); in testBasicUsage()
63 bind(String.class).annotatedWith(named("b")).toInstance("ii"); in testBasicUsage()
65 bind(AB.class).annotatedWith(named("two")).to(AB.class); in testBasicUsage()
66 expose(AB.class).annotatedWith(named("two")); in testBasicUsage()
88 bindA.bind(String.class).annotatedWith(named("a")).toInstance("i"); in testWithoutPrivateModules()
89 bindA.expose(String.class).annotatedWith(named("a")); in testWithoutPrivateModules()
90 bindA.bind(String.class).annotatedWith(named("c")).toInstance("private to A"); in testWithoutPrivateModules()
[all …]
DTypeConversionTest.java84 bindConstant().annotatedWith(NumericValue.class).to("5"); in testOneConstantInjection()
103 bindConstant().annotatedWith(NumericValue.class).to("5"); in testConstantInjection()
104 bindConstant().annotatedWith(BooleanValue.class).to("true"); in testConstantInjection()
105 bindConstant().annotatedWith(EnumValue.class).to("TEE"); in testConstantInjection()
106 bindConstant().annotatedWith(ClassName.class).to(Foo.class.getName()); in testConstantInjection()
138 bindConstant().annotatedWith(NumericValue.class).to("5"); in testConstantInjectionWithExplicitBindingsRequired()
139 bindConstant().annotatedWith(BooleanValue.class).to("true"); in testConstantInjectionWithExplicitBindingsRequired()
140 bindConstant().annotatedWith(EnumValue.class).to("TEE"); in testConstantInjectionWithExplicitBindingsRequired()
141 bindConstant().annotatedWith(ClassName.class).to(Foo.class.getName()); in testConstantInjectionWithExplicitBindingsRequired()
181 bindConstant().annotatedWith(NumericValue.class).to("invalid"); in configure()
[all …]
DBinderTest.java122 bind(Date.class).annotatedWith(Names.named("date")); in testMissingBindings()
227 bindConstant().annotatedWith(Names.named("nullOne")).to(none); in testBindingNullConstant()
228 bind(String.class).annotatedWith(Names.named("nullTwo")).toInstance(none); in testBindingNullConstant()
255 bind(Integer.class).annotatedWith(Names.named("a")).toString()); in testToStringOnBinderApi()
259 bindConstant().annotatedWith(Names.named("b")).toString()); in testToStringOnBinderApi()
281 assertNotSerializable(bind(Integer.class).annotatedWith(Names.named("a"))); in testNothingIsSerializableInBinderApi()
283 assertNotSerializable(bindConstant().annotatedWith(Names.named("b"))); in testNothingIsSerializableInBinderApi()
568 bind(AbstractModule.class).annotatedWith(red).toProvider(Providers.<AbstractModule>of(null)); in configure()
569 bind(Binder.class).annotatedWith(red).toProvider(Providers.<Binder>of(null)); in configure()
570 bind(Binding.class).annotatedWith(red).toProvider(Providers.<Binding>of(null)); in configure()
[all …]
DRequestInjectionTest.java54 bindConstant().annotatedWith(ForMethod.class).to("test"); in testInjectMembers()
55 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()
88 bindConstant().annotatedWith(ForMethod.class).to("test"); in testInjectMembersAndStatics()
89 bindConstant().annotatedWith(ForField.class).to(5); in testInjectMembersAndStatics()
DBindingAnnotationTest.java36 bindConstant().annotatedWith(Blue.class).to("foo"); in testAnnotationWithValueMatchesKeyWithTypeOnly()
53 bindConstant().annotatedWith(Blue.class).to("foo"); in testRequireExactAnnotationsDisablesFallback()
75 bindConstant().annotatedWith(Red.class).to("foo"); in testRequireExactAnnotationsDoesntBreakIfDefaultsExist()
89 bindConstant().annotatedWith(Color.class).to("foo"); in testRequireExactAnnotationsRequireAllOptionals()
111 bindConstant().annotatedWith(createBlue(6)).to("six"); in testAnnotationWithValueThatDoesntMatch()
DDuplicateBindingsTest.java525 bind(Foo.class).annotatedWith(named("instance")).toInstance(foo); in configure()
528 bind(Foo.class).annotatedWith(named("pInstance")).toProvider(pFoo); in configure()
531 bind(Foo.class).annotatedWith(named("pKey")).toProvider(pclFoo); in configure()
534 bind(Foo.class).annotatedWith(named("linkedKey")).to(clFoo); in configure()
540 bind(Foo.class).annotatedWith(named("constructor")).toConstructor(cFoo); in configure()
566 bind(Foo.class).annotatedWith(named("pInstance")).toProvider(pFoo).in(scope); in configure()
569 bind(Foo.class).annotatedWith(named("pKey")).toProvider(pclFoo).in(scope); in configure()
572 bind(Foo.class).annotatedWith(named("linkedKey")).to(clFoo).in(scope); in configure()
578 bind(Foo.class).annotatedWith(named("constructor")).toConstructor(cFoo).in(scope); in configure()
599 bind(Foo.class).annotatedWith(named("pInstance")).toProvider(pFoo).in(scope); in configure()
[all …]
DProviderInjectionTest.java141 .annotatedWith(named("a")) in testCreationTimeInjectionOrdering()
152 .annotatedWith(named("b")) in testCreationTimeInjectionOrdering()
170 .annotatedWith(named("c")) in testCreationTimeInjectionOrdering()
186 bind(Count.class).annotatedWith(named("d")).toInstance(new Count(8)); in testCreationTimeInjectionOrdering()
187 bind(Count.class).annotatedWith(named("e")).toInstance(new Count(16)); in testCreationTimeInjectionOrdering()
DInjectorTest.java65 bind(SampleSingleton.class).annotatedWith(Other.class).toInstance(other); in testProviderMethods()
98 bindConstant().annotatedWith(S.class).to("test"); in createFooInjector()
99 bindConstant().annotatedWith(I.class).to(5); in createFooInjector()
118 bindConstant().annotatedWith(I.class).to(5);
218 bindConstant().annotatedWith(S.class).to("test");
219 bindConstant().annotatedWith(I.class).to(5);
/external/guice/extensions/grapher/test/com/google/inject/grapher/demo/
DBackToTheFutureModule.java35 bind(EnergySource.class).annotatedWith(Nuclear.class).to(Plutonium.class); in configure()
36 bind(EnergySource.class).annotatedWith(Renewable.class).to(Lightning.class); in configure()
39 bind(PinballParts.class).annotatedWith(Used.class).toInstance(new PinballParts()); in configure()
41 bind(Person.class).annotatedWith(Driver.class).to(MartyMcFly.class).in(Singleton.class); in configure()
42 bind(Person.class).annotatedWith(Inventor.class).to(DocBrown.class).in(Singleton.class); in configure()
44 bindConstant().annotatedWith(Names.named("year")).to("1955"); in configure()
/external/dokka/core/src/main/kotlin/Utilities/
DDokkaModules.kt29 …binder.bind<DokkaResolutionFacade>().annotatedWith(Names.named("libraryResolutionFacade")).toInsta… in configure()
47 …binder.bind(File::class.java).annotatedWith(Names.named("outputDir")).toInstance(File(options.outp… in configure()
51 …binder.bind(StringListType).annotatedWith(Names.named(impliedPlatformsName)).toInstance(options.im… in configure()
52 … binder.bind<String>().annotatedWith(Names.named("outlineRoot")).toInstance(options.outlineRoot) in configure()
53 binder.bind<String>().annotatedWith(Names.named("dacRoot")).toInstance(options.dacRoot) in configure()
54 …binder.bind<Boolean>().annotatedWith(Names.named("generateClassIndex")).toInstance(options.generat… in configure()
55 …binder.bind<Boolean>().annotatedWith(Names.named("generatePackageIndex")).toInstance(options.gener… in configure()
65 …bind(T::class.java).annotatedWith(Names.named(it.name)).to(T::class.java.classLoader.loadClass(it.… in registerCategory()
70 bind(Base::class.java).annotatedWith(Names.named(name)).to(T::class.java) in bindNameAnnotated()
/external/guice/core/test/com/google/inject/matcher/
DMatcherTest.java21 import static com.google.inject.matcher.Matchers.annotatedWith;
75 assertTrue(annotatedWith(Foo.class).matches(Bar.class)); in testAnnotatedWith()
76 assertFalse(annotatedWith(Foo.class).matches(MatcherTest.class.getMethods()[0])); in testAnnotatedWith()
77 assertEquals("annotatedWith(Foo.class)", annotatedWith(Foo.class).toString()); in testAnnotatedWith()
78 assertEqualsBothWays(annotatedWith(Foo.class), annotatedWith(Foo.class)); in testAnnotatedWith()
79 assertFalse(annotatedWith(Foo.class).equals(annotatedWith(Named.class))); in testAnnotatedWith()
82 annotatedWith(Baz.class); in testAnnotatedWith()
149 assertEqualWhenReserialized(annotatedWith(Named.class)); in testSerialization()
150 assertEqualWhenReserialized(annotatedWith(Names.named("foo"))); in testSerialization()
/external/guice/extensions/persist/src/com/google/inject/persist/
DPersistModule.java19 import static com.google.inject.matcher.Matchers.annotatedWith;
42 bindInterceptor(annotatedWith(Transactional.class), any(), getTransactionInterceptor()); in configure()
44 bindInterceptor(any(), annotatedWith(Transactional.class), getTransactionInterceptor()); in configure()
/external/dokka/core/src/test/kotlin/format/
DDacFormatTestCase.kt43 … binder.bind<Boolean>().annotatedWith(Names.named("generateClassIndex")).toInstance(false) in <lambda>()
44 … binder.bind<Boolean>().annotatedWith(Names.named("generatePackageIndex")).toInstance(false) in <lambda>()
46 binder.bind<String>().annotatedWith(Names.named("dacRoot")).toInstance("") in <lambda>()
47 binder.bind<String>().annotatedWith(Names.named("outlineRoot")).toInstance("") in <lambda>()
48 binder.bind<File>().annotatedWith(Names.named("outputDir")).toInstance(folder.root) in <lambda>()
/external/guice/core/test/com/google/inject/spi/
DElementsTest.java160 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 …]
DSpiBindingsTest.java56 bindConstant().annotatedWith(Names.named("one")).to(1); in testBindConstant()
231 bindConstant().annotatedWith(Names.named("one")).to(1); in testConstantBinding()
259 bindConstant().annotatedWith(Names.named("one")).to("1"); in testConvertedConstantBinding()
309 .annotatedWith(Names.named("a")) in testScopes()
313 .annotatedWith(Names.named("b")) in testScopes()
317 .annotatedWith(Names.named("c")) in testScopes()
320 bind(String.class).annotatedWith(Names.named("d")).toProvider(StringProvider.class); in testScopes()
/external/guice/core/src/com/google/inject/binder/
DAnnotatedElementBuilder.java30 void annotatedWith(Class<? extends Annotation> annotationType); in annotatedWith() method
33 void annotatedWith(Annotation annotation); in annotatedWith() method
DAnnotatedConstantBindingBuilder.java29 ConstantBindingBuilder annotatedWith(Class<? extends Annotation> annotationType); in annotatedWith() method
32 ConstantBindingBuilder annotatedWith(Annotation annotation); in annotatedWith() method
DAnnotatedBindingBuilder.java29 LinkedBindingBuilder<T> annotatedWith(Class<? extends Annotation> annotationType); in annotatedWith() method
32 LinkedBindingBuilder<T> annotatedWith(Annotation annotation); in annotatedWith() method
/external/guice/core/test/com/googlecode/guice/
DJsr330Test.java86 bind(B.class).annotatedWith(Names.named("jodie")).toInstance(b); in testQualifiedInject()
87 bind(C.class).annotatedWith(Red.class).toInstance(c); in testQualifiedInject()
88 bind(D.class).annotatedWith(RED).toInstance(d); in testQualifiedInject()
89 bind(E.class).annotatedWith(Names.named("jesse")).toInstance(e); in testQualifiedInject()
107 bind(B.class).annotatedWith(Names.named("jodie")).toInstance(b); in testProviderInject()
109 bind(D.class).annotatedWith(RED).toInstance(d); in testProviderInject()
278 bind(B.class).annotatedWith(Names.named("1")).toProvider(BProvider.class); in testBindProviderClass()
279 bind(B.class).annotatedWith(Names.named("2")).toProvider(Key.get(BProvider.class)); in testBindProviderClass()
281 .annotatedWith(Names.named("3")) in testBindProviderClass()
/external/auto/factory/src/it/functional/src/main/java/com/google/auto/factory/
DGuiceModule.java23 bind(Dependency.class).annotatedWith(Qualifier.class).to(QualifiedDependencyImpl.class); in configure()
25 bind(Integer.class).annotatedWith(Qualifier.class).toInstance(2); in configure()
/external/guice/extensions/grapher/src/com/google/inject/grapher/graphviz/
DGraphvizModule.java31 bind(NameFactory.class).annotatedWith(Graphviz.class).to(ShortNameFactory.class); in configure()
32 bind(PortIdFactory.class).annotatedWith(Graphviz.class).to(PortIdFactoryImpl.class); in configure()
/external/guice/jdk8-tests/test/com/google/inject/jdk8/
DDefaultMethodInterceptionTest.java83 Matchers.any(), Matchers.annotatedWith(InterceptMe.class), interceptor); in testInterceptedDefaultMethod()
101 Matchers.any(), Matchers.annotatedWith(InterceptMe.class), interceptor); in testInterceptedDefaultMethod_calledByAnotherMethod()
130 Matchers.any(), Matchers.annotatedWith(InterceptMe.class), interceptor); in testInterceptedDefaultMethod_whenParentClassDefinesNonInterceptedMethod()
166 Matchers.any(), Matchers.annotatedWith(InterceptMe.class), interceptor); in testInterceptedDefaultMethod_whenParentClassDefinesInterceptedMethod()
/external/guice/extensions/jmx/test/com/google/inject/tools/jmx/
DJmxTest.java54 bind(Foo.class).annotatedWith(Transactional.class).to(FooImpl.class); in configure()
55 bindConstant().annotatedWith(Names.named("port")).to(8080); in configure()
/external/guice/core/src/com/google/inject/internal/
DExposureBuilder.java44 public void annotatedWith(Class<? extends Annotation> annotationType) { in annotatedWith() method in ExposureBuilder
51 public void annotatedWith(Annotation annotation) { in annotatedWith() method in ExposureBuilder
/external/guice/extensions/assistedinject/test/com/google/inject/assistedinject/
DExtensionSpiTest.java196 bind(String.class).annotatedWith(named("catName1")).toInstance("kitty1"); in configure()
197 bind(String.class).annotatedWith(named("catName2")).toInstance("kitty2"); in configure()
198 bind(String.class).annotatedWith(named("petName")).toInstance("pussy"); in configure()
199 bind(Integer.class).annotatedWith(named("age")).toInstance(12); in configure()

123