entity Type
Declares the entity subclass E as animatable, returning the EntityType element registered under this ProcessModel.
The element's name is E::class.simpleName, which equals the javaClass.simpleName the engine emits in EntityCreated — so it matches the trace by construction (no strings, no drift). Declaration is optional: undeclared types still appear in the trace and can be styled after a run; declaring a type merely makes it available in the inventory before a run.
class Clinic(parent: ModelElement) : ProcessModel(parent, "clinic") {
val patient = entityType<Patient>() // surfaces "Patient" to the animation inventory pre-run
inner class Patient : Entity()
}Content copied to clipboard
Throws
if E is anonymous (has no simple name)