/**
* Registers the specified <code>module</code> to all the loaded modules.
*
* @param id
* the id of the module to be registered
* @param module
* the <code>module</code> to be registered
*
* @return <code>true</code> if the <code>module</code> was added, otherwise
* <code>false</code>
*/
protected boolean registerModule(final String id, final Object module) {
final Object current;
// register the module
if (!isModule(id, module)) {
if (isAnonymousId(id)) {
if (id.contains(MethodInvokingFactoryBean.class.getName())
|| id.contains(MethodExecutorBean.class.getName())
|| id.contains(net.meisen.general.sbconfigurator.factories.MethodInvokingFactoryBean.class
.getName())) {
if (LOG.isTraceEnabled()) {
LOG.trace("Skipping the bean '"
+ id
+ "' as module, because it is an anonymous bean used for MethodInvokation");
}
} else if (LOG.isWarnEnabled()) {
LOG.warn("Skipping the bean '"
+ id
+ "' as module, because it is probably an anonymous bean");
}
} else {
if (LOG.isTraceEnabled()) {
LOG.trace("Skipping the bean '" + id + "' as module");
}
}
return false;
} else if ((current = modules.put(id, module)) != null) {
if (LOG.isWarnEnabled() && !Objects.equals(current, module)) {
LOG.warn("Overloading the module '" + id + "'");
}
return true;
} else {
if (LOG.isDebugEnabled()) {
LOG.debug("Loaded the module '" + id + "' of type '"
+ module.getClass().getName() + "'");
}
return true;
}
}
DefaultConfiguration.java 文件源码
java
阅读 29
收藏 0
点赞 0
评论 0
项目:gen-sbconfigurator
作者:
评论列表
文章目录