MentaContainer

Compare Revisions

Ignore whitespace Rev 20 → Rev 23

/trunk/src/main/java/org/mentacontainer/impl/MentaComponent.java
31,6 → 31,8
private Map<String, Method> cache = null;
private final boolean singleton;
private Object singletonValue = null;
 
public MentaComponent(String name, Class<? extends Object> klass, boolean singleton) {
220,6 → 222,8
public Object getInstance() throws InstantiationException {
if (singleton && singletonValue != null) return singletonValue;
Object obj = null;
if (initValues != null && initValues.size() > 0) {
271,6 → 275,8
}
}
if (obj != null && singleton) singletonValue = obj;
return obj;
}
}