org.jacoco.core.internal.analysis.filter
Class KotlinDefaultArgumentsFilter
java.lang.Object
org.jacoco.core.internal.analysis.filter.KotlinDefaultArgumentsFilter
- All Implemented Interfaces:
- IFilter
public final class KotlinDefaultArgumentsFilter
- extends 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:
Where maskVar is penultimate argument of synthetic method with
suffix "$default" or of synthetic constructor with last argument
"kotlin.jvm.internal.DefaultConstructorMarker". And its value can't be zero -
invocation with all arguments uses original non synthetic method, thus
IFEQ instructions should be ignored.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KotlinDefaultArgumentsFilter
public KotlinDefaultArgumentsFilter()
filter
public void filter(org.objectweb.asm.tree.MethodNode methodNode,
IFilterContext context,
IFilterOutput output)
- Description copied from interface:
IFilter
- This method is called for every method. The filter implementation is
expected to inspect the provided method and report its result to the
given
IFilterOutput instance.
- Specified by:
filter in interface IFilter
- Parameters:
methodNode - method to inspectcontext - context information for the methodoutput - callback to report filtering results to
Copyright © 2009–2023 Mountainminds GmbH & Co. KG. All rights reserved.