Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende Überarbeitung | |||
| software:deep:dev:rts:enums [2014-04-25 17:27] – graf | software:deep:dev:rts:enums [Unbekanntes Datum] (aktuell) – gelöscht - Externe Bearbeitung (Unbekanntes Datum) 127.0.0.1 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== Enumerations ====== | + | |
| - | Enumerations are supported. In an enum class two synthetic methods are created in the Bystecode. | + | |
| - | * values(): returns an array with all values, uses // | + | |
| - | * valueOf(String name): returns the value with the name //name//. This method calls //valueOf// of the class //Enum//. Though with a slightly different signature than what is present in our runtime library. That's why this case must be specially handled by the class file reader. Further, in the SSA a reference to the field // | + | |
| - | \\ | + | |
| - | If enum values are used in a switch statement, a special field // | + | |
| - | An excellent reference to the internals of enums can be found at [[http:// | + | |