}
private static void processResultMap(Class<?> clazz,
StringBuffer resultMapSb) {
if (clazz.isAnnotationPresent(ResultMap.class)) {
ResultMap annotation = clazz.getAnnotation(ResultMap.class);
String id = annotation.id();
// 检查当前resultMap是否已经在其它dao中声明并解析过了
if (resultMapIds.contains(id))
return;
resultMapIds.add(id);
Class<?> resultClass = annotation.resultClass();
Result[] results = annotation.result();
resultMapSb.append(" <resultMap id=\"" + id + "\" class=\""
+ resultClass.getName() + "\">");
for (Result result : results) {
resultMapSb.append("\n <result property=\""