You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tasks/astrid/common-src/com/todoroo/andlib/service/AbstractDependencyInjector....

27 lines
732 B
Java

package com.todoroo.andlib.service;
import java.lang.reflect.Field;
/**
* A Dependency Injector knows how to inject certain dependencies based
* on the field that is passed in.
*
* @author Tim Su <tim@todoroo.com>
*
*/
public interface AbstractDependencyInjector {
/**
* Gets the injected object for this field. If implementing class does not
* know how to handle this dependency, it should return null
*
* @param object
* object to perform dependency injection on
* @param field
* field tagged with {link Autowired} annotation
* @return object to assign to this field, or null
*/
abstract Object getInjection(Object object, Field field);
}