EnumSet

annotation class EnumSet

Converts a list of Strings to a Set of Enum values (case-insensitive).

The enum type is inferred from the type parameter of the field (e.g., Set<MyEnum>). Strings that do not match any enum constant are silently dropped.

Example:

enum class Mode { READ, WRITE, ADMIN }

data class MyConfig(
@EnumSet val modes: Set<Mode>? = null
)

YAML:

modes:
- read
- write