Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of a Dagger wrapped pilot stack for Activity/Stack scoped DI.
/**
* 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
You can’t perform that action at this time.