Class RecordsFilter.Matcher
- java.lang.Object
-
- org.jacoco.core.internal.analysis.filter.AbstractMatcher
-
- org.jacoco.core.internal.analysis.filter.RecordsFilter.Matcher
-
- Enclosing class:
- RecordsFilter
private static class RecordsFilter.Matcher extends AbstractMatcher
-
-
Field Summary
-
Fields inherited from class org.jacoco.core.internal.analysis.filter.AbstractMatcher
cursor, vars
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Matcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) boolean
isEquals(org.objectweb.asm.tree.MethodNode m)
(package private) boolean
isFieldAccessor(org.objectweb.asm.tree.MethodNode m)
Criteria: method name == field name, only three instructions (aload0, getField, return), and note that this class only happens in a record, so it's safe to assume that this is the record field accessor generated.(package private) boolean
isHashCode(org.objectweb.asm.tree.MethodNode m)
(package private) boolean
isToString(org.objectweb.asm.tree.MethodNode m)
private void
nextIsInvokeDynamic(java.lang.String name)
-
Methods inherited from class org.jacoco.core.internal.analysis.filter.AbstractMatcher
firstIsALoad0, next, nextIs, nextIsField, nextIsInvoke, nextIsSwitch, nextIsType, nextIsVar, skipNonOpcodes, skipNonOpcodes
-
-
-
-
Method Detail
-
isToString
boolean isToString(org.objectweb.asm.tree.MethodNode m)
-
isHashCode
boolean isHashCode(org.objectweb.asm.tree.MethodNode m)
-
isFieldAccessor
boolean isFieldAccessor(org.objectweb.asm.tree.MethodNode m)
Criteria: method name == field name, only three instructions (aload0, getField, return), and note that this class only happens in a record, so it's safe to assume that this is the record field accessor generated. It may happen that the code is explicitly written by the developer and is intentionally kept the same as the default generated format, but that's just trivial code, and it still makes sense to filter them out anyway.Exception: if the code is compiled within IntelliJ IDEA's Java instrumentation, there will be extra null-assertion instructions after the getField instruction. This case is
ignored .
-
isEquals
boolean isEquals(org.objectweb.asm.tree.MethodNode m)
-
nextIsInvokeDynamic
private void nextIsInvokeDynamic(java.lang.String name)
-
-