mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2026-04-16 14:40:12 +00:00
generate docs for a lot of API (test try)
This commit is contained in:
@@ -2,6 +2,13 @@ package dev.inmo.micro_ksp.generator
|
||||
|
||||
import com.google.devtools.ksp.symbol.KSClassDeclaration
|
||||
|
||||
/**
|
||||
* Recursively resolves all subclasses of this sealed class declaration.
|
||||
* For sealed classes, it traverses the entire hierarchy of sealed subclasses.
|
||||
* For non-sealed classes (leaf nodes), it returns the class itself.
|
||||
*
|
||||
* @return A list of all concrete (non-sealed) subclass declarations in the hierarchy
|
||||
*/
|
||||
fun KSClassDeclaration.resolveSubclasses(): List<KSClassDeclaration> {
|
||||
return (getSealedSubclasses().flatMap {
|
||||
it.resolveSubclasses()
|
||||
|
||||
Reference in New Issue
Block a user