Create a gist now

Instantly share code, notes, and snippets.

@olafleur /MyBundle.java Secret
Created Dec 1, 2015

What would you like to do?
public class MyBundle {
public final Provider<FirstService> firstServiceProvider;
public final Provider<SecondService> secondServiceProvider;
@Inject
MyBundle(Provider<FirstService> firstServiceProvider, Provider<SecondService> secondServiceProvider) {
this.firstServiceProvider = firstServiceProvider;
this.secondServiceProvider = secondServiceProvider;
}
public FirstService getFirstService() {
return firstServiceProvider.get();
}
public SecondService getSecondService() {
return secondServiceProvider.get();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment