declaringClass

Extension property that determines the declaring class of a Kotlin function. This property handles both regular member functions and extension functions, returning the appropriate declaring class.

For member functions, it returns the class containing the function. For extension functions, it returns the class being extended. For top-level functions, it returns the declaring class of the underlying Java method.