Back to project page DistributedMemory.
The source code is released under:
Apache License
If you think the Android project DistributedMemory 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 org.faudroids.distributedmemory.common; /*from w w w . j av a 2 s.c om*/ import android.app.Application; import java.util.List; import dagger.ObjectGraph; public abstract class BaseApplication extends Application implements Injector { private ObjectGraph objectGraph; @Override public void onCreate() { super.onCreate(); List<Object> modules = getModules(); modules.add(new CommonModule(getApplicationContext())); objectGraph = ObjectGraph.create(modules.toArray()); objectGraph.inject(this); } @Override public ObjectGraph createScopedGraph(Object... modules) { return objectGraph.plus(modules); } protected abstract List<Object> getModules(); }