Back to project page Teracast-Android.
The source code is released under:
Apache License
If you think the Android project Teracast-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.davidtpate.teracast; /* w ww.ja va 2s. c o m*/ import dagger.ObjectGraph; public final class Injector { private 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 void inject(final Object target) { objectGraph.inject(target); } public static <T> T resolve(Class<T> type) { return objectGraph.get(type); } }