Package org.jacoco.core.internal.instr
Interface IProbeArrayStrategy
-
- All Known Implementing Classes:
ClassFieldProbeArrayStrategy,CondyProbeArrayStrategy,InterfaceFieldProbeArrayStrategy,LocalProbeArrayStrategy,NoneProbeArrayStrategy
public interface IProbeArrayStrategyStrategies to retrieve the probe array instance for each method within a type. This abstraction is required as we need to follow a different strategy depending on whether the instrumented type is a class or interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddMembers(org.objectweb.asm.ClassVisitor cv, int probeCount)Adds additional class members required by this strategy.intstoreInstance(org.objectweb.asm.MethodVisitor mv, boolean clinit, int variable)Creates code that stores the probe array instance in the given variable.
-
-
-
Method Detail
-
storeInstance
int storeInstance(org.objectweb.asm.MethodVisitor mv, boolean clinit, int variable)Creates code that stores the probe array instance in the given variable.- Parameters:
mv- visitor to create codeclinit- true in case of<clinit>methodvariable- variable index to store probe array to- Returns:
- maximum stack size required by the generated code
-
addMembers
void addMembers(org.objectweb.asm.ClassVisitor cv, int probeCount)Adds additional class members required by this strategy. This method is called after all original members of the class has been processed.- Parameters:
cv- visitor to create fields and methodsprobeCount- total number of probes required for this class
-
-