Skip to content

Instantly share code, notes, and snippets.

@windless
Last active December 17, 2015 03:19
Show Gist options
  • Save windless/5541978 to your computer and use it in GitHub Desktop.
Save windless/5541978 to your computer and use it in GitHub Desktop.
Java: Dagger application
public class Application extends Application {
private static ObjectGraph objectGraph;
public static <T> static inject(T instance) {
objectGraph.inject(instance);
}
@Override
public void OnCreate() {
super.OnCreate();
objectGraph = ObjectGraph.create(new AndroidModule(this));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment