/** * Returns a new multibinder that collects instances of the key's type in a {@link Set} that is * itself bound with the annotation (if any) of the key. * * @since 4.0 */ public static <T> Multibinder<T> newSetBinder(Binder binder, Key<T> key) { return newRealSetBinder(binder, key); }
/** * Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is * itself bound with {@code annotationType}. */ public static <T> Multibinder<T> newSetBinder(Binder binder, TypeLiteral<T> type, Class<? extends Annotation> annotationType) { return newRealSetBinder(binder, Key.get(type, annotationType)); }
/** * Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is * itself bound with {@code annotation}. */ public static <T> Multibinder<T> newSetBinder( Binder binder, TypeLiteral<T> type, Annotation annotation) { return newRealSetBinder(binder, Key.get(type, annotation)); }
/** * Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is * itself bound with no binding annotation. */ public static <T> Multibinder<T> newSetBinder(Binder binder, Class<T> type) { return newRealSetBinder(binder, Key.get(type)); }
/** * Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is * itself bound with {@code annotation}. */ public static <T> Multibinder<T> newSetBinder( Binder binder, Class<T> type, Annotation annotation) { return newRealSetBinder(binder, Key.get(type, annotation)); }
/** * Returns a new multibinder that collects instances of {@code type} in a {@link Set} that is * itself bound with no binding annotation. */ public static <T> Multibinder<T> newSetBinder(Binder binder, TypeLiteral<T> type) { return newRealSetBinder(binder, Key.get(type)); }
binder.addError("Found a MapKey annotation on non map binding at %s.", method); return Multibinder.newRealSetBinder(binder, key).getKeyForNewItem(); } else if (annotation instanceof ProvidesIntoMap) { if (mapKey.error) {