Created
March 31, 2017 12:53
-
-
Save doridori/3873b8f8a11b98fcf62e89d7f22825f3 to your computer and use it in GitHub Desktop.
Example of a Dagger wrapped pilot stack for Activity/Stack scoped DI.
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
/** | |
* A PilotStack that also holds a ref to a Dagger Component. This is useful for easy Activity-Scoped DI as the PilotStack has to already live | |
* on past the host-Activities config-change events by some mechanism (project dependent). | |
* | |
* @param <D> A Dagger Component to supply all deps for this stacks frames. | |
*/ | |
//todo unused - here for dagger activity scope refactor (See trello) | |
public class DaggerPilotStack<D> extends PilotStack | |
{ | |
D scopedDaggerComponent; | |
public DaggerPilotStack(PilotFrameFactory pilotFrameFactory, D scopedDaggerComponent) | |
{ | |
super(pilotFrameFactory); | |
this.scopedDaggerComponent = scopedDaggerComponent; | |
} | |
public D getScopedDaggerComponent() | |
{ | |
return scopedDaggerComponent; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment