Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// AppComponent.java
@Singleton
@Component(modules = {
AppModule.class,
GithubApiModule.class
})
public interface AppComponent {
UserComponent.Builder userComponentBuilder();
}
// UserComponent.java
@UserScope
@Subcomponent(modules = UserModule.class)
public interface UserComponent {
@Subcomponent.Builder
interface Builder {
UserComponent.Builder sessionModule(UserModule userModule);
UserComponent build();
}
UserDetailsActivityComponent plus(UserDetailsActivityComponent.UserDetailsActivityModule module);
}
// UserDetailsActivityComponent.java
@ActivityScope
@Subcomponent(modules = UserDetailsActivityComponent.UserDetailsActivityModule.class)
public interface UserDetailsActivityComponent {
UserDetailsActivity inject(UserDetailsActivity activity);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment