EnumFieldType
class EnumFieldType<V : Enum<V>>(enumValues: Array<V>, fieldValue: EnumValue<V, *>, type: FieldType<*, *>, val termType: KClass<*>) : SimpleFieldType<V>
A field type that transforms enum variants to field values and vice verse.
Parameters
V
the type of enum
enumValues
an array of enum variants. Usually got by calling enumValues function.
fieldValue
function interface that takes enum variant and returns field value.
type
original field type
termType
should be V::class