use of org.jacoco.core.internal.analysis.ClassAnalyzer in project jacoco by jacoco.
the class Analyzer method createAnalyzingVisitor.
/**
* Creates an ASM class visitor for analysis.
*
* @param classid
* id of the class calculated with {@link CRC64}
* @param className
* VM name of the class
* @return ASM visitor to write class definition to
*/
private ClassVisitor createAnalyzingVisitor(final long classid, final String className) {
final ExecutionData data = executionData.get(classid);
final boolean[] probes;
final boolean noMatch;
if (data == null) {
probes = null;
noMatch = executionData.contains(className);
} else {
probes = data.getProbes();
noMatch = false;
}
final ClassCoverageImpl coverage = new ClassCoverageImpl(className, classid, noMatch);
final ClassAnalyzer analyzer = new ClassAnalyzer(coverage, probes, stringPool) {
@Override
public void visitEnd() {
super.visitEnd();
coverageVisitor.visitCoverage(coverage);
}
};
return new ClassProbesAdapter(analyzer, false);
}
Aggregations