Class KotlinDefaultArgumentsFilter
- java.lang.Object
-
- org.jacoco.core.internal.analysis.filter.KotlinDefaultArgumentsFilter
-
- All Implemented Interfaces:
IFilter
public final class KotlinDefaultArgumentsFilter extends java.lang.Object implements IFilter
Filters branches that Kotlin compiler generates for default arguments. For each default argument Kotlin compiler generates following bytecode to determine if it should be used or not:ILOAD maskVar ICONST_x, BIPUSH, SIPUSH, LDC or LDC_W IAND IFEQ label default argument label:
WheremaskVaris penultimate argument of synthetic method with suffix "$default". And its value can't be zero - invocation with all arguments uses original non synthetic method, thusIFEQinstructions should be ignored.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classKotlinDefaultArgumentsFilter.Matcher
-
Constructor Summary
Constructors Constructor Description KotlinDefaultArgumentsFilter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfilter(org.objectweb.asm.tree.MethodNode methodNode, IFilterContext context, IFilterOutput output)This method is called for every method.(package private) static booleanisDefaultArgumentsMethodName(java.lang.String methodName)
-
-
-
Method Detail
-
isDefaultArgumentsMethodName
static boolean isDefaultArgumentsMethodName(java.lang.String methodName)
-
filter
public void filter(org.objectweb.asm.tree.MethodNode methodNode, IFilterContext context, IFilterOutput output)Description copied from interface:IFilterThis method is called for every method. The filter implementation is expected to inspect the provided method and report its result to the givenIFilterOutputinstance.
-
-