MentaContainer

Compare Revisions

Ignore whitespace Rev 138 → Rev 139

/trunk/src/main/java/org/mentacontainer/impl/MentaContainer.java
41,8 → 41,10
@Override
public Class<? extends Object> getType(Object key) {
Factory factory = factoriesByName.get(key.toString());
String k = InjectionUtils.getKeyName(key);
Factory factory = factoriesByName.get(k);
if (factory == null) return null;
return factory.getType();
115,7 → 117,7
@Override
public <T> T clear(Object key) {
String keyString = key.toString();
String keyString = InjectionUtils.getKeyName(key);
if (!factoriesByName.containsKey(keyString)) return null;
197,7 → 199,7
@Override
public <T> T get(Object key) {
String keyString = key.toString();
String keyString = InjectionUtils.getKeyName(key);
 
if (!factoriesByName.containsKey(keyString)) return null;
 
368,7 → 370,7
@Override
public Factory ioc(Object key, Factory factory, Scope scope) {
String keyString = key.toString();
String keyString = InjectionUtils.getKeyName(key);
factoriesByName.put(keyString, factory);
417,7 → 419,7
// autowire by constructor and setter...
String s = sourceFromContainer.toString();
String s = InjectionUtils.getKeyName(sourceFromContainer);
autowireBySetter(s);
429,7 → 431,7
// autowire by constructor and setter...
String s = sourceFromContainer.toString();
String s = InjectionUtils.getKeyName(sourceFromContainer);
autowireBySetter(beanProperty, s);
504,7 → 506,7
@Override
public synchronized boolean check(Object obj) {
String key = obj.toString();
String key = InjectionUtils.getKeyName(obj);
if (!factoriesByName.containsKey(key)) return false;