public static Tag toTag(Map<MethodDef, List<MethodDef>> catalog) { Tag coverage = new Tag("coverage"); String currentClass = null; Tag classTag = null; for (Map.Entry<MethodDef, List<MethodDef>> m : catalog.entrySet()) { String className = m.getKey().clazz; if (!className.equals(currentClass)) { classTag = new Tag("class"); classTag.addAttribute("name", className); classTag.addAttribute("package", Clazz.getPackage(className)); classTag.addAttribute("short", Clazz.getShortName(className)); coverage.addContent(classTag); currentClass = className; } Tag method = doMethod(new Tag("method"), m.getKey()); classTag.addContent(method); for (MethodDef r : m.getValue()) { Tag ref = doMethod(new Tag("ref"), r); method.addContent(ref); } } return coverage; }
public static Tag toTag(Map<MethodDef, List<MethodDef>> catalog) { Tag coverage = new Tag("coverage"); String currentClass = null; Tag classTag = null; for (Map.Entry<MethodDef, List<MethodDef>> m : catalog.entrySet()) { String className = m.getKey() .getContainingClass() .getFQN(); if (!className.equals(currentClass)) { classTag = new Tag("class"); classTag.addAttribute("name", className); classTag.addAttribute("package", Descriptors.getPackage(className)); classTag.addAttribute("short", Descriptors.getShortName(className)); coverage.addContent(classTag); currentClass = className; } Tag method = doMethod(new Tag("method"), m.getKey()); if (classTag != null) classTag.addContent(method); for (MethodDef r : m.getValue()) { Tag ref = doMethod(new Tag("ref"), r); method.addContent(ref); } } return coverage; }
public static Tag toTag(Map<MethodDef,List<MethodDef>> catalog) { Tag coverage = new Tag("coverage"); String currentClass = null; Tag classTag = null; for (Map.Entry<MethodDef,List<MethodDef>> m : catalog.entrySet()) { String className = m.getKey().getContainingClass().getFQN(); if (!className.equals(currentClass)) { classTag = new Tag("class"); classTag.addAttribute("name", className); classTag.addAttribute("package", Descriptors.getPackage(className)); classTag.addAttribute("short", Descriptors.getShortName(className)); coverage.addContent(classTag); currentClass = className; } Tag method = doMethod(new Tag("method"), m.getKey()); if ( classTag != null) classTag.addContent(method); for (MethodDef r : m.getValue()) { Tag ref = doMethod(new Tag("ref"), r); method.addContent(ref); } } return coverage; }
public static Tag toTag(Map<MethodDef,List<MethodDef>> catalog) { Tag coverage = new Tag("coverage"); String currentClass = null; Tag classTag = null; for (Map.Entry<MethodDef,List<MethodDef>> m : catalog.entrySet()) { String className = m.getKey().getContainingClass().getFQN(); if (!className.equals(currentClass)) { classTag = new Tag("class"); classTag.addAttribute("name", className); classTag.addAttribute("package", Descriptors.getPackage(className)); classTag.addAttribute("short", Descriptors.getShortName(className)); coverage.addContent(classTag); currentClass = className; } Tag method = doMethod(new Tag("method"), m.getKey()); if ( classTag != null) classTag.addContent(method); for (MethodDef r : m.getValue()) { Tag ref = doMethod(new Tag("ref"), r); method.addContent(ref); } } return coverage; }
public static Tag toTag(Map<MethodDef, List<MethodDef>> catalog) { Tag coverage = new Tag("coverage"); String currentClass = null; Tag classTag = null; for (Map.Entry<MethodDef, List<MethodDef>> m : catalog.entrySet()) { String className = m.getKey() .getContainingClass() .getFQN(); if (!className.equals(currentClass)) { classTag = new Tag("class"); classTag.addAttribute("name", className); classTag.addAttribute("package", Descriptors.getPackage(className)); classTag.addAttribute("short", Descriptors.getShortName(className)); coverage.addContent(classTag); currentClass = className; } Tag method = doMethod(new Tag("method"), m.getKey()); if (classTag != null) classTag.addContent(method); for (MethodDef r : m.getValue()) { Tag ref = doMethod(new Tag("ref"), r); method.addContent(ref); } } return coverage; }
public static Tag toTag(Map<MethodDef,List<MethodDef>> catalog) { Tag coverage = new Tag("coverage"); String currentClass = null; Tag classTag = null; for (Map.Entry<MethodDef,List<MethodDef>> m : catalog.entrySet()) { String className = m.getKey().getContainingClass().getFQN(); if (!className.equals(currentClass)) { classTag = new Tag("class"); classTag.addAttribute("name", className); classTag.addAttribute("package", Descriptors.getPackage(className)); classTag.addAttribute("short", Descriptors.getShortName(className)); coverage.addContent(classTag); currentClass = className; } Tag method = doMethod(new Tag("method"), m.getKey()); if ( classTag != null) classTag.addContent(method); for (MethodDef r : m.getValue()) { Tag ref = doMethod(new Tag("ref"), r); method.addContent(ref); } } return coverage; }