Back to project page whoisit-android.
The source code is released under:
MIT License
If you think the Android project whoisit-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.mitchbarry.android.whoisit; /* w w w . j a va2 s .c om*/ import dagger.ObjectGraph; public final class Injector { public static ObjectGraph objectGraph = null; public static void init(final Object rootModule) { if(objectGraph == null) { objectGraph = ObjectGraph.create(rootModule); } else { objectGraph = objectGraph.plus(rootModule); } // Inject statics objectGraph.injectStatics(); } public static void init(final Object rootModule, final Object target) { init(rootModule); inject(target); } public static final void inject(final Object target) { objectGraph.inject(target); } public static <T> T resolve(Class<T> type) { return objectGraph.get(type); } }