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
-
class ProbeCounter extends ClassProbesVisitor
Internal class to remember the total number of probes required for a class.
-
-
Constructor Summary
Constructors Constructor Description ProbeCounter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
getCount()
(package private) boolean
hasMethods()
MethodProbesVisitor
visitMethod(int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.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.
-
-
-
Method Detail
-
visitMethod
public MethodProbesVisitor visitMethod(int access, java.lang.String name, java.lang.String desc, java.lang.String signature, java.lang.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
-
-