1 /*
2  * Copyright (C) 2023 The Dagger Authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package dagger.functional.kotlinsrc.multibindings
18 
19 import dagger.Component
20 import dagger.functional.kotlinsrc.multibindings.subpackage.ContributionsModule
21 import dagger.multibindings.StringKey
22 import javax.inject.Named
23 import javax.inject.Provider
24 
25 @Component(
26   modules = [MultibindingModule::class, MultibindsModule::class, ContributionsModule::class],
27   dependencies = [MultibindingDependency::class]
28 )
29 interface MultibindingComponent {
mapnull30   fun map(): Map<String, String>
31   fun mapOfArrays(): Map<String, Array<String>>
32   fun mapOfProviders(): Map<String, Provider<String>>
33   fun mapKeys(): Set<String>
34   fun mapValues(): Collection<String>
35   fun set(): Set<Int>
36   fun nestedKeyMap(): Map<NestedAnnotationContainer.NestedWrappedKey, String>
37   fun numberClassKeyMap(): Map<Class<out Number>, String>
38   fun classKeyMap(): Map<Class<*>, String>
39   fun longKeyMap(): Map<Long, String>
40   fun integerKeyMap(): Map<Int, String>
41   fun shortKeyMap(): Map<Short, String>
42   fun byteKeyMap(): Map<Byte, String>
43   fun booleanKeyMap(): Map<Boolean, String>
44   fun characterKeyMap(): Map<Char, String>
45   fun unwrappedAnnotationKeyMap(): Map<StringKey, String>
46   fun wrappedAnnotationKeyMap(): Map<WrappedAnnotationKey, String>
47 
48   @Named("complexQualifier") fun complexQualifierStringSet(): Set<String>
49   fun emptySet(): Set<Any>
50 
51   @Named("complexQualifier") fun emptyQualifiedSet(): Set<Any>
52   fun emptyMap(): Map<String, Any>
53 
54   @Named("complexQualifier") fun emptyQualifiedMap(): Map<String, Any>
55   fun maybeEmptySet(): Set<CharSequence>
56 
57   @Named("complexQualifier") fun maybeEmptyQualifiedSet(): Set<CharSequence>
58   fun maybeEmptyMap(): Map<String, CharSequence>
59 
60   @Named("complexQualifier") fun maybeEmptyQualifiedMap(): Map<String, CharSequence>
61 }
62