OpenTypeConverter.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:monarch 作者:
/**
 * 
 * @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;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号