Class EnumSwitchFilter
- java.lang.Object
-
- org.pitest.mutationtest.build.intercept.RegionInterceptor
-
- org.pitest.mutationtest.build.intercept.javafeatures.EnumSwitchFilter
-
- All Implemented Interfaces:
MutationInterceptor
public class EnumSwitchFilter extends RegionInterceptor
For switches on Enums java creates a synthetic class with an int array field. The following code then accesses it GETSTATIC pkg/Person$1.$SwitchMap$pkg$MyEnum : [I ALOAD 1 INVOKEVIRTUAL pkg/MyEnum.ordinal ()I IALOAD LOOKUPSWITCH As the generated class is synthetic, no mutants will be seeded in it. The code that accesses it must however be filtered.
-
-
Constructor Summary
Constructors Constructor Description EnumSwitchFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<Region>computeRegions(MethodTree method)-
Methods inherited from class org.pitest.mutationtest.build.intercept.RegionInterceptor
begin, buildPredicate, end, intercept, type
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pitest.mutationtest.build.MutationInterceptor
initialise
-
-
-
-
Method Detail
-
computeRegions
protected List<Region> computeRegions(MethodTree method)
- Specified by:
computeRegionsin classRegionInterceptor
-
-