← Back to Stormify Documentation

register

fun register(enumClass: KClass<*>, entries: Array<out Enum<*>>, toInt: (Any) -> Int)

Registers the enum constants and int encoder for the given enum class. Called by annproc-generated code at startup; user code normally does not invoke this directly. fromInt and fromName are derived from entries on each lookup.