1 /* 2 * Copyright (C) 2015 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; 18 19 import dagger.Component; 20 import dagger.functional.sub.ContributionsModule; 21 import dagger.multibindings.StringKey; 22 import java.util.Collection; 23 import java.util.Map; 24 import java.util.Set; 25 import javax.inject.Named; 26 import javax.inject.Provider; 27 28 @Component( 29 modules = {MultibindingModule.class, MultibindsModule.class, ContributionsModule.class}, 30 dependencies = MultibindingDependency.class 31 ) 32 interface MultibindingComponent { map()33 Map<String, String> map(); mapOfArrays()34 Map<String, String[]> mapOfArrays(); mapOfProviders()35 Map<String, Provider<String>> mapOfProviders(); mapKeys()36 Set<String> mapKeys(); mapValues()37 Collection<String> mapValues(); set()38 Set<Integer> set(); nestedKeyMap()39 Map<NestedAnnotationContainer.NestedWrappedKey, String> nestedKeyMap(); numberClassKeyMap()40 Map<Class<? extends Number>, String> numberClassKeyMap(); classKeyMap()41 Map<Class<?>, String> classKeyMap(); longKeyMap()42 Map<Long, String> longKeyMap(); integerKeyMap()43 Map<Integer, String> integerKeyMap(); shortKeyMap()44 Map<Short, String> shortKeyMap(); byteKeyMap()45 Map<Byte, String> byteKeyMap(); booleanKeyMap()46 Map<Boolean, String> booleanKeyMap(); characterKeyMap()47 Map<Character, String> characterKeyMap(); unwrappedAnnotationKeyMap()48 Map<StringKey, String> unwrappedAnnotationKeyMap(); wrappedAnnotationKeyMap()49 Map<WrappedAnnotationKey, String> wrappedAnnotationKeyMap(); complexQualifierStringSet()50 @Named("complexQualifier") Set<String> complexQualifierStringSet(); emptySet()51 Set<Object> emptySet(); 52 53 @Named("complexQualifier") emptyQualifiedSet()54 Set<Object> emptyQualifiedSet(); 55 emptyMap()56 Map<String, Object> emptyMap(); 57 58 @Named("complexQualifier") emptyQualifiedMap()59 Map<String, Object> emptyQualifiedMap(); 60 maybeEmptySet()61 Set<CharSequence> maybeEmptySet(); 62 63 @Named("complexQualifier") maybeEmptyQualifiedSet()64 Set<CharSequence> maybeEmptyQualifiedSet(); 65 maybeEmptyMap()66 Map<String, CharSequence> maybeEmptyMap(); 67 68 @Named("complexQualifier") maybeEmptyQualifiedMap()69 Map<String, CharSequence> maybeEmptyQualifiedMap(); 70 } 71