Package org.jacoco.core.internal.instr
Class ProbeCounter
java.lang.Object
org.objectweb.asm.ClassVisitor
org.jacoco.core.internal.flow.ClassProbesVisitor
org.jacoco.core.internal.instr.ProbeCounter
Internal class to remember the total number of probes required for a class.
-
Field Summary
FieldsFields inherited from class org.objectweb.asm.ClassVisitor
api, cv
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) int
getCount()
(package private) boolean
visitMethod
(int access, String name, String desc, String signature, String[] exceptions) When visiting a method we need aMethodProbesVisitor
to handle the probes of that method.void
visitTotalProbeCount
(int count) Reports the total number of encountered probes.Methods inherited from class org.objectweb.asm.ClassVisitor
visit, visitAnnotation, visitAttribute, visitEnd, visitField, visitInnerClass, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource, visitTypeAnnotation
-
Field Details
-
count
private int count -
methods
private boolean methods
-
-
Constructor Details
-
ProbeCounter
ProbeCounter()
-
-
Method Details
-
visitMethod
public MethodProbesVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) Description copied from class:ClassProbesVisitor
When visiting a method we need aMethodProbesVisitor
to handle the probes of that method.- Specified by:
visitMethod
in classClassProbesVisitor
-
visitTotalProbeCount
public void visitTotalProbeCount(int count) Description copied from class:ClassProbesVisitor
Reports the total number of encountered probes. For classes this method is called just beforeClassVisitor.visitEnd()
. For interfaces this method is called before the first method (the static initializer) is emitted.- Specified by:
visitTotalProbeCount
in classClassProbesVisitor
- Parameters:
count
- total number of probes
-
getCount
int getCount() -
hasMethods
boolean hasMethods()- Returns:
true
if the class has non-abstract methods other than a static initializer
-