Wrapper for an enum value with its type token.
The enum type
The KClass type token for runtime type checking
String representation of the value. For enums, this is the enum's name property. For strings, this is the string itself.
The actual enum instance
Returns the enum value if this is an EnumValue, null otherwise. The type is erased to Enum<*> since the actual type is not known at compile time.
Attempts to retrieve the value as the specified enum type.
Attempts to retrieve the value as the specified enum type using KClass.
Checks if this value is of the specified enum type.
Checks if this value is of the specified enum type using KClass.