The setter of an Enum attribute sets it has a Enum, but the getter is trying to read it as a string. This always result in a ClassCastException being thrown.
Below is an exemple of the setter and getter generated for an Enum attribute.
override fun setMindMapState(v: MindMapState?) {
if(v == null) removeProperty("mindMapState")
else putProperty("mindMapState", v)
}
override fun getMindMapState(): MindMapState? {
val res = getProperty("mindMapState", AsString)
return if (res != null) enumValueOf<MindMapState>(res) else null
}