mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2025-01-27 18:14:53 +00:00
12 lines
301 B
Kotlin
12 lines
301 B
Kotlin
package dev.inmo.micro_ksp.generator
|
|
|
|
import com.google.devtools.ksp.symbol.KSClassDeclaration
|
|
|
|
fun KSClassDeclaration.resolveSubclasses(): List<KSClassDeclaration> {
|
|
return (getSealedSubclasses().flatMap {
|
|
it.resolveSubclasses()
|
|
}.ifEmpty {
|
|
sequenceOf(this)
|
|
}).toList()
|
|
}
|