1 /* 2 * Copyright (C) 2016 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.producers.multibindings; 18 19 import com.google.common.util.concurrent.ListenableFuture; 20 import dagger.functional.producers.ExecutorModule; 21 import dagger.functional.producers.multibindings.Qualifiers.EmptyButDeclaredInModule; 22 import dagger.functional.producers.multibindings.Qualifiers.EmptyButDeclaredInModuleAndProducerModule; 23 import dagger.functional.producers.multibindings.Qualifiers.ObjCount; 24 import dagger.functional.producers.multibindings.Qualifiers.OnlyProvisionMultibindings; 25 import dagger.functional.producers.multibindings.Qualifiers.PossiblyThrowingMap; 26 import dagger.functional.producers.multibindings.Qualifiers.PossiblyThrowingSet; 27 import dagger.producers.Produced; 28 import dagger.producers.Producer; 29 import dagger.producers.ProductionComponent; 30 import java.util.Map; 31 import java.util.Set; 32 33 @ProductionComponent( 34 modules = {ExecutorModule.class, MultibindingProducerModule.class, MultibindingModule.class} 35 ) 36 interface MultibindingComponent { strs()37 ListenableFuture<Set<String>> strs(); strCount()38 ListenableFuture<Integer> strCount(); 39 successfulSet()40 ListenableFuture<Set<Produced<String>>> successfulSet(); 41 42 @PossiblyThrowingSet possiblyThrowingSet()43 ListenableFuture<Set<Produced<String>>> possiblyThrowingSet(); 44 map()45 ListenableFuture<Map<Integer, String>> map(); 46 mapOfProducer()47 ListenableFuture<Map<Integer, Producer<String>>> mapOfProducer(); 48 mapOfProduced()49 ListenableFuture<Map<Integer, Produced<String>>> mapOfProduced(); 50 51 @PossiblyThrowingMap possiblyThrowingMap()52 ListenableFuture<Map<Integer, String>> possiblyThrowingMap(); 53 54 @PossiblyThrowingMap possiblyThrowingMapOfProducer()55 ListenableFuture<Map<Integer, Producer<String>>> possiblyThrowingMapOfProducer(); 56 57 @PossiblyThrowingMap possiblyThrowingMapOfProduced()58 ListenableFuture<Map<Integer, Produced<String>>> possiblyThrowingMapOfProduced(); 59 objs()60 ListenableFuture<Set<Object>> objs(); 61 producedObjs()62 ListenableFuture<Set<Produced<Object>>> producedObjs(); 63 objMap()64 ListenableFuture<Map<Object, Object>> objMap(); 65 objMapOfProduced()66 ListenableFuture<Map<Object, Produced<Object>>> objMapOfProduced(); 67 objMapOfProducer()68 ListenableFuture<Map<Object, Producer<Object>>> objMapOfProducer(); 69 70 @ObjCount objCount()71 ListenableFuture<Integer> objCount(); 72 73 @EmptyButDeclaredInModuleAndProducerModule emptyButDeclaredInModuleAndProducerModule()74 ListenableFuture<Map<String, Object>> emptyButDeclaredInModuleAndProducerModule(); 75 76 @EmptyButDeclaredInModule emptyButDeclaredInModule()77 ListenableFuture<Map<String, Object>> emptyButDeclaredInModule(); 78 79 @OnlyProvisionMultibindings onlyProvisionMultibindings()80 ListenableFuture<Map<String, Object>> onlyProvisionMultibindings(); 81 } 82