Reflections()

I am trying to use Reflections() and importing “kotlin.reflect”; but still getting “Unresolved reference: Reflections()”.

What other imports am I missing here?

There is no such class in Kotlin standard libraries, neither in kotlin-stdlib, nor in kotlin-reflect.
Why do you expect it to be there?

I was hoping to use Reflections to get a list of all child classes of a particular parent. Thank you.

Maybe you need to add this library to the project dependencies?

2 Likes