org.jacoco.core.internal.analysis.filter
Class EnumEmptyConstructorFilter
java.lang.Object
org.jacoco.core.internal.analysis.filter.EnumEmptyConstructorFilter
- All Implemented Interfaces:
- IFilter
public final class EnumEmptyConstructorFilter
- extends 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 to
filter of private empty
constructors - empty constructor in enums without additional parameters
should be filtered out even if it is not implicit.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnumEmptyConstructorFilter
public EnumEmptyConstructorFilter()
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–2024 Mountainminds GmbH & Co. KG. All rights reserved.