Class CondyProbeArrayStrategy
java.lang.Object
org.jacoco.core.internal.instr.CondyProbeArrayStrategy
- All Implemented Interfaces:
IProbeArrayStrategy
This strategy for Java 11+ class files uses
ConstantDynamic to hold
the probe array and adds bootstrap method requesting the probe array from the
runtime.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IExecutionDataAccessorGeneratorstatic final StringDescriptor of the bootstrap method.private final longprivate final Stringprivate final boolean -
Constructor Summary
ConstructorsConstructorDescriptionCondyProbeArrayStrategy(String className, boolean isInterface, long classId, IExecutionDataAccessorGenerator accessorGenerator) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMembers(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.
-
Field Details
-
B_DESC
-
className
-
isInterface
private final boolean isInterface -
classId
private final long classId -
accessorGenerator
-
-
Constructor Details
-
CondyProbeArrayStrategy
CondyProbeArrayStrategy(String className, boolean isInterface, long classId, IExecutionDataAccessorGenerator accessorGenerator)
-
-
Method Details
-
storeInstance
public int storeInstance(org.objectweb.asm.MethodVisitor mv, boolean clinit, int variable) Description copied from interface:IProbeArrayStrategyCreates code that stores the probe array instance in the given variable.- Specified by:
storeInstancein interfaceIProbeArrayStrategy- 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
public void addMembers(org.objectweb.asm.ClassVisitor cv, int probeCount) Description copied from interface:IProbeArrayStrategyAdds additional class members required by this strategy. This method is called after all original members of the class has been processed.- Specified by:
addMembersin interfaceIProbeArrayStrategy- Parameters:
cv- visitor to create fields and methodsprobeCount- total number of probes required for this class
-