Skip to content

Instantly share code, notes, and snippets.

@frogermcs
Last active July 20, 2016 19:16
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 frogermcs/91387701a6cbfe302bfb5617857f0b50 to your computer and use it in GitHub Desktop.
Save frogermcs/91387701a6cbfe302bfb5617857f0b50 to your computer and use it in GitHub Desktop.
@UserScope
@Subcomponent(
modules = UserModule.class
)
public interface UserComponent {
UserProfileActivity inject(UserProfileActivity activity);
}
//===== AppComponent.java =====
@Singleton
@Component(modules = {...})
public interface AppComponent {
// Factory method to create subcomponent
UserComponent plus(UserModule module);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment