com.todoroo.andlib.service
Class DependencyInjectionService

java.lang.Object
  extended by com.todoroo.andlib.service.DependencyInjectionService

public class DependencyInjectionService
extends java.lang.Object

Simple Dependency Injection Service for Android.

Add dependency injectors to the injector chain, then invoke this method against classes you wish to perform dependency injection for.

All errors encountered are handled as warnings, so if dependency injection seems to be failing, check the logs for more information.

Author:
Tim Su

Method Summary
 void addInjector(AbstractDependencyInjector injector)
          Adds a Dependency Injector to the front of the list
static DependencyInjectionService getInstance()
          Gets the singleton instance of the dependency injection service.
 void inject(java.lang.Object caller)
          Perform dependency injection in the caller object
 void removeInjector(AbstractDependencyInjector injector)
          Removes the supplied injector
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

inject

public void inject(java.lang.Object caller)
Perform dependency injection in the caller object

Parameters:
caller - object to perform DI on

getInstance

public static DependencyInjectionService getInstance()
Gets the singleton instance of the dependency injection service.

Returns:

removeInjector

public void removeInjector(AbstractDependencyInjector injector)
Removes the supplied injector


addInjector

public void addInjector(AbstractDependencyInjector injector)
Adds a Dependency Injector to the front of the list

Parameters:
injectors -