Hi - is there any safe way to obtain the name of t...
# getting-started
e
Hi - is there any safe way to obtain the name of the enclosing class of a
KFunction<*>
? I've got a weird situation where kfunction.javaClass.enclosingClass.simpleName works in one situation, but not another situation.
d
javaClass
here will always return the
Class
for
KFunction
, probably not what you want. You most likely want something like
myKFunction.javaMethod?.getDeclaringClass
to get the Class declaring the method
e
Hey thanks, this worked wonderfully.