Enumerations

Enumerations are supported. In an enum class two synthetic methods are created in the Bystecode.


If enum values are used in a switch statement, a special field $SWITCH_TABLE$CLASSNAME will be created in the class with the switch statement. Further, a method is generated with the signature static int[] $SWITCH_TABLE$CLASSNAME(). This method is called before the first use of the switch statement. It initializes an int-array with the ordinal numbers of the enum entries.
An excellent reference to the internals of enums can be found at http://www.straub.as/java/basic/enums.html.