Class EnumEmptyConstructorFilter
- java.lang.Object
-
- org.jacoco.core.internal.analysis.filter.EnumEmptyConstructorFilter
-
- All Implemented Interfaces:
IFilter
public final class EnumEmptyConstructorFilter extends java.lang.Object implements IFilter
Filters empty enum constructors. Constructor of enum is invoked from static initialization block to create instance of each enum constant. So it won't be executed if number of enum constants is zero. Such enums are sometimes used as alternative to classes with static utilities and private empty constructor. Implicit constructor of enum created by compiler doesn't have a synthetic flag and refers to a line of enum definition. Therefore in order to not have partial coverage of enum definition line in enums without enum constants and similarly tofilter of private empty constructors
- empty constructor in enums without additional parameters should be filtered out even if it is not implicit.
-
-
Constructor Summary
Constructors Constructor Description EnumEmptyConstructorFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
filter(org.objectweb.asm.tree.MethodNode methodNode, IFilterContext context, IFilterOutput output)
This method is called for every method.
-
-
-
Method Detail
-
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 givenIFilterOutput
instance.
-
-