com.nikedlab.android.inject.ServiceInjector Maven / Gradle / Ivy
package com.nikedlab.android.inject;
import android.app.Service;
/**
* Created with Comodo Inc.
* User: Kuzmenko Victor
* Date: 8/7/13
* Time: 1:13 PM
*/
public abstract class ServiceInjector extends Service {
private InjectedApplication application;
protected ServiceInjector() {
InjectedApplication application = getInjectedApplication();
application.injectInto(this);
}
private InjectedApplication getInjectedApplication() {
if (application == null) {
application = (InjectedApplication) InjectedApplication.application;
}
return application;
}
}