NestedUtils

@API(status = API.Status.EXPERIMENTAL, since = "4.1.0")
object NestedUtils

Functions

Link copied to clipboard
fun getNestedClasses(baseKClass: KClass<*>, curDepth: Int = 0, maxDepth: Int = 9): Flow<KClass<*>>

Returns a sequence of nested classes from the given class This includes the class itself.

Link copied to clipboard
fun <R : Any> getNestedInstances(clazz: KClass<*>, baseInstance: Any, curDepth: Int = 0, maxDepth: Int = 9): Flow<R>

Gets all instances of R by traversing the given class and all of its nested classes.