MentaContainer

Compare Revisions

Ignore whitespace Rev 44 → Rev 45

/trunk/src/main/java/org/mentacontainer/impl/MentaContainer.java
7,6 → 7,7
import java.util.Set;
 
import org.mentacontainer.Component;
import org.mentacontainer.ConfigurableComponent;
import org.mentacontainer.Container;
import org.mentacontainer.Dependency;
import org.mentacontainer.util.InjectionUtils;
118,14 → 119,22
return component;
}
public Component ioc(String key, Class<? extends Object> klass) {
public ConfigurableComponent ioc(String key, Class<? extends Object> klass) {
return ioc(key, new MentaComponent(klass));
ConfigurableComponent cc = new MentaComponent(klass);
ioc(key, cc);
return cc;
}
public Component ioc(String key, Class<? extends Object> klass, boolean singleton) {
public ConfigurableComponent ioc(String key, Class<? extends Object> klass, boolean singleton) {
return ioc(key, new MentaComponent(klass, singleton));
ConfigurableComponent cc = new MentaComponent(klass, singleton);
ioc(key, cc);
return cc;
}
 
public Dependency autowire(Dependency d) {