com.todoroo.andlib.service
Class AbstractDependencyInjector

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

public abstract class AbstractDependencyInjector
extends java.lang.Object

A Dependency Injector knows how to inject certain dependencies based on the field that is passed in. You will need to write your own initialization code to insert this dependency injector into the DI chain.

Author:
Tim Su

Method Summary
 java.lang.Object getInjection(java.lang.Object object, java.lang.reflect.Field field)
          Gets the injected object for this field.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInjection

public java.lang.Object getInjection(java.lang.Object object,
                                     java.lang.reflect.Field field)
Gets the injected object for this field. If implementing class does not know how to handle this dependency, it should return null

Parameters:
object - object to perform dependency injection on
field - field tagged with {link Autowired} annotation
Returns:
object to assign to this field, or null

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object