/**
*
* @param objType
* @return the converter for the given Java type, creating it if necessary
* @throws OpenDataException
*/
public static synchronized OpenTypeConverter toConverter(Type objType) throws OpenDataException {
if (inProgress.containsKey(objType)) {
throw new OpenDataException("Recursive data structure, including " + typeName(objType));
}
OpenTypeConverter conv;
conv = getConverter(objType);
if (conv != null)
return conv;
inProgress.put(objType, objType);
try {
conv = makeConverter(objType);
} catch (OpenDataException e) {
throw openDataException("Cannot convert type: " + objType, e);
} finally {
inProgress.remove(objType);
}
putConverter(objType, conv);
return conv;
}
OpenTypeConverter.java 文件源码
java
阅读 33
收藏 0
点赞 0
评论 0
项目:monarch
作者:
评论列表
文章目录