@SuppressWarnings("unchecked")
protected Object _get(Map map, String name, ObjectFactory factory, boolean registerCb) {
Object o = map.get(name);
if(o == null) {
o = factory.getObject();
map.put(name, o);
if(registerCb && defaultDestructionCallback != null) {
try {
Constructor c = defaultDestructionCallback.getConstructor(Scope.class,String.class);
registerDestructionCallback(name, (Runnable) c.newInstance(this,name));
} catch(Exception e) {
log.error("Could not setup destruction callback: " + name, e);
}
}
}
return o;
}
AbstractScope.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:spring-scopes
作者:
评论列表
文章目录