Top Description Methods
com.google.inject.multibindings

public @Interface ProvidesIntoSet

extends Annotation
Annotations
@Documented
@Target:METHOD
@Retention:RUNTIME
@Keep
Static Imports
java.lang.annotation.ElementType.METHOD, .RetentionPolicy.RUNTIME

Annotates methods of a Module to add items to a Multibinder. The method's return type and binding annotation determines what Set this will contribute to. For example,
@ProvidesIntoSet
@Named("urls")
String provideFooUrl(FooManager fm) { return fm.getUrl(); }

@ProvidesIntoSet
@Named("urls")
String provideBarUrl(BarManager bm) { return bm.getUrl(); }
will add two items to the @Named("urls") Set<String> set. The items are bound as providers and will be evaluated at injection time.
Author
[email protected] (Sam Berlin)
Since
4.0

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString