标签:builder his lis ring empty info xutils rem source
public CoverageBuilder(String gitPath, String newBranchName, String oldBranchName, List<String> exclusionList) {
this.classes = new HashMap<String, IClassCoverage>();
this.sourcefiles = new HashMap<String, ISourceFileCoverage>();
List<ClassInfo> classInfoList = CodeDiff.diffBranchToBranch(gitPath, newBranchName, oldBranchName);
if(exclusionList != null && !exclusionList.isEmpty()){
List<Pattern> nameList = new ArrayList<Pattern>();
List<Pattern> packageList = new ArrayList<Pattern>();
for(String item : exclusionList){
item = RegExUtils.removeAll(item, "\\*\\*\\/");
item = RegExUtils.removeAll(item, "\\/\\*\\*");
if(StringUtils.endsWith(item, ".java")||StringUtils.endsWith(item,".class")){
nameList.add(Pattern.compile(RegExUtils.replaceAll(StringUtils.remove(StringUtils.remove(item, ".java"), ".class"), "\\*", ".*")));
} else {
packageList.add(Pattern.compile(RegExUtils.replaceAll(item, "\\*", ".*")));
}
}
for (int i = classInfoList.size() -1; i >=0; i--) {
if(excludeClass(classInfoList.get(i), packageList, nameList)){
exclusionList.remove(i);
}
}
}
classInfos = classInfoList;
}
标签:builder his lis ring empty info xutils rem source
原文地址:https://www.cnblogs.com/exmyth/p/13366267.html