/**
* For error messages - returns null if there are any exceptions of any
* kind building the string (or of the list is empty for some unknown reason).
* @param ext - if true, list of extensions, otherwise a list of engine names
*/
private static String getSupportedEngines(ScriptEngineManager mgr,
boolean ext) {
String result = null;
try {
List<ScriptEngineFactory> factories = mgr.getEngineFactories();
if (null == factories) return result;
Set<String> engines = new LinkedHashSet<>(factories.size());
for (ScriptEngineFactory f : factories) {
if (ext) {
engines.addAll(f.getExtensions());
} else {
engines.addAll(f.getNames());
}
}
result = StringUtils.join(engines, ", ");
} catch (RuntimeException e) {
/* :NOOP: */
}
return result;
}
StatelessScriptUpdateProcessorFactory.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:search
作者:
评论列表
文章目录