Skip to content

Instantly share code, notes, and snippets.

@lukaspili
Created March 3, 2015 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukaspili/11bacf7ceb98da1e3f42 to your computer and use it in GitHub Desktop.
Save lukaspili/11bacf7ceb98da1e3f42 to your computer and use it in GitHub Desktop.
@Singleton
public class ApiManager {
@Inject
Api api;
@Inject
public ApiManager() {
}
public void useApi() {
api.itWorks();
}
}
@Component(modules = {ApiModule.class, DatabaseModule.class})
@Singleton
public interface DataAccessComponent {
Api api();
Database database();
ApiManager apiManager();
void inject(SimpleActivity simpleActivity);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment