MentaContainer

Compare Revisions

Ignore whitespace Rev 21 → Rev 22

/trunk/src/main/java/org/mentacontainer/impl/MentaContainer.java
10,6 → 10,7
import org.mentacontainer.Container;
import org.mentacontainer.Dependency;
import org.mentacontainer.util.InjectionUtils;
import org.mentacontainer.util.InjectionUtils.Provider;
 
/**
* The implementation of the IoC container.
148,8 → 149,22
}
 
public Container populate(Object bean) throws Exception {
Provider p = new Provider() {
public Object get(String key) {
return MentaContainer.this.get(key);
}
public boolean contains(String key) {
return MentaContainer.this.contains(key);
}
};
 
InjectionUtils.getObject(bean, this, false, null, true, false, true);
InjectionUtils.getObject(bean, p, false, null, true, false, true);
 
return this;
}