use of com.qlangtech.tis.util.XStream2PluginInfoReader in project tis by qlangtech.
the class ComponentMeta method loadPluginMeta.
/**
* 取得元数据信息
*
* @return
*/
public Set<XStream2.PluginMeta> loadPluginMeta() {
synchronized (RobustReflectionConverter.usedPluginInfo) {
RobustReflectionConverter.usedPluginInfo.remove();
XStream2PluginInfoReader reader = new XStream2PluginInfoReader(XmlFile.DEFAULT_DRIVER);
for (IRepositoryResource res : this.resources) {
File targetFile = res.getTargetFile();
if (!targetFile.exists()) {
// throw new IllegalStateException("file:" + targetFile.getAbsolutePath() + " is not exist");
continue;
}
try {
XmlFile xmlFile = new XmlFile(reader, targetFile);
xmlFile.read();
} catch (IOException e) {
throw new RuntimeException(targetFile.getAbsolutePath(), e);
}
}
return RobustReflectionConverter.usedPluginInfo.get();
}
}
Aggregations