Skip to content

filtering JAVAC.ENUM

Evgeny Mandrikov edited this page Jan 9, 2017 · 3 revisions

This page discusses a not yet available feature!

Description

For enums compiler generates two additional methods values and valueOf. This results in partial coverage of enum definition line if one of them is not used.

Filtering

Source Example

enum EnumExample {
  CONST
}

Bytecode Pattern

public static values()[LEnumExample;
 L0
  LINENUMBER 1 L0
  ...

public static valueOf(Ljava/lang/String;)LEnumExample;
 L0
  LINENUMBER 1 L0
  ...