Created
July 16, 2014 18:14
-
-
Save tophyr/ef2d4429a318079eb01a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Provides | |
Noodile provideNoodile(@Named("fooClaster") Claster foo, @Named("barClaster") Claster bar) { | |
... | |
} | |
// need to duplicate this function for fooClaster and barClaster? or can i specify that a fooClaster uses this with @Named("foo") Jeebus? | |
@Provides | |
Claster provideJeebus(Jeebus j) { | |
Claster c = new Claster(j); | |
// do a bunch of setup logic that doesn't change between Jeebi | |
return c; | |
} | |
@Provides @Named("foo") | |
Jeebus provideFooJebus() { | |
return new Jeebus("foo"); | |
} | |
@Provides @Named("bar") | |
Jeebus provideBarJeebus() { | |
return new Jeebus("bar"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment