MentaContainer

Compare Revisions

Ignore whitespace Rev 100 → Rev 101

/trunk/src/main/java/org/mentacontainer/impl/MentaContainer.java
421,10 → 421,27
return cc;
}
 
@Override
public void autowireBySetter(String targetProperty, String sourceFromContainer) {
public void autowire(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);
432,14 → 449,12
setterDependencies.add(d);
}
@Override
public void autowireBySetter(String targetProperty) {
private void autowireBySetter(String targetProperty) {
autowireBySetter(targetProperty, targetProperty);
}
@Override
public void autowireByConstructor(String sourceFromContainer) {
private void autowireByConstructor(String sourceFromContainer) {
Class<? extends Object> sourceType = getType(sourceFromContainer);