MentaContainer

Compare Revisions

Ignore whitespace Rev 101 → Rev 100

/trunk/src/main/java/org/mentacontainer/impl/MentaContainer.java
421,27 → 421,10
return cc;
}
 
@Override
public void autowire(String sourceFromContainer) {
public void autowireBySetter(String targetProperty, String sourceFromContainer) {
// autowire by constructor and setter...
autowireBySetter(sourceFromContainer);
autowireByConstructor(sourceFromContainer);
}
@Override
public void autowire(String sourceFromContainer, String beanProperty) {
// only by setter, because constructors does not have parameter names or properties...
autowireBySetter(beanProperty, sourceFromContainer);
}
 
private void autowireBySetter(String targetProperty, String sourceFromContainer) {
Class<? extends Object> sourceType = getType(sourceFromContainer);
 
SetterDependency d = new SetterDependency(targetProperty, sourceFromContainer, sourceType);
449,12 → 432,14
setterDependencies.add(d);
}
private void autowireBySetter(String targetProperty) {
@Override
public void autowireBySetter(String targetProperty) {
autowireBySetter(targetProperty, targetProperty);
}
private void autowireByConstructor(String sourceFromContainer) {
@Override
public void autowireByConstructor(String sourceFromContainer) {
Class<? extends Object> sourceType = getType(sourceFromContainer);