码迷,mamicode.com
首页 > 其他好文 > 详细

泛型 T的定义

时间:2017-07-21 17:11:19      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:ret   style   reg   null   binding   new   bind   erp   session   

public <T> T getMapper(Class<T> type, SqlSession sqlSession) {
MapperProxyFactory mapperProxyFactory = (MapperProxyFactory)this.knownMappers.get(type);
if(mapperProxyFactory == null) {
throw new BindingException("Type " + type + " is not known to the MapperRegistry.");
} else {
try {
return mapperProxyFactory.newInstance(sqlSession);
} catch (Exception var5) {
throw new BindingException("Error getting mapper instance. Cause: " + var5, var5);
}
}
}

泛型 T的定义

标签:ret   style   reg   null   binding   new   bind   erp   session   

原文地址:http://www.cnblogs.com/guoyongqiang/p/7218337.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!