public class Enum extends Object:
Base class for language enumerations.
Enum values are singleton instances stored as static readonly fields on the generated enum class. The compiler injects calls to Enum.bind(...) to associate the symbolic state name used by toString().
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | declaringTypedeclaringType as Type: |
Concrete enum type declaring this state. |
| public readonly property | namename as String: |
Symbolic state name without the declaring type prefix. |
| public readonly property | ordinalordinal as Int: |
Zero-based declaration position of this enum state. |
| Modifier and Type | Member | Description |
|---|---|---|
| public static | bind | Binds an enum instance to its symbolic state name and returns the same instance. |
| public override | toStringtoString() as String: |
Returns the canonical enum state name in the form TypeName.STATE. |
| public static | valueAt | Resolves the canonical singleton at one declaration ordinal. |
| public static | valueOf | Resolves the canonical singleton for a symbolic enum state. |