ClassCoverageInfo (@Nullable PsiClass psiClass, @Nullable ClassData classData, boolean ignoreImplicitConstructor) { if (classData == null || classData.getLines() == null) return null; ClassCoverageInfo info = new ClassCoverageInfo(); boolean isDefaultConstructorGenerated = false; final Collection<String> methodSigs = classData.getMethodSigs(); for (final String nameAndSig : methodSigs) { if (ignoreImplicitConstructor && isGeneratedDefaultConstructor(psiClass, nameAndSig)) { isDefaultConstructorGenerated = true; continue; } if (classData.getStatus(nameAndSig) != LineCoverage.NONE) { info.coveredMethodCount++; } info.totalMethodCount++; } final Object[] lines = classData.getLines(); for (Object l : lines) { if (l instanceof LineData lineData) { if (isDefaultConstructorGenerated && isDefaultConstructor(lineData.getMethodSignature())) { continue; } else if (lineData.getStatus() == LineCoverage.FULL) { info.fullyCoveredLineCount++; } else if (lineData.getStatus() == LineCoverage.PARTIAL) { info.partiallyCoveredLineCount++; } info.totalLineCount++; BranchData branchData = lineData.getBranchData(); if (branchData != null) { info.totalBranchCount += branchData.getTotalBranches(); info.coveredBranchCount += branchData.getCoveredBranches(); } } } if (!methodSigs.isEmpty()) { info.totalClassCount = 1; if (info.getCoveredLineCount() > 0) { info.coveredClassCount = 1; } } return info; }