https://kotlinlang.org logo
#reflect
Title
# reflect
t

TwoClocks

08/23/2021, 9:08 PM
what's the difference between
functions
and
memberFunctions
and
declaredFunctions
and
declaredMemberFunctions
? The docs don't point any obvious differences.
e

ephemient

08/23/2021, 9:48 PM
Copy code
Math::class.functions.size // 85 here
Math::class.declaredFunctions.size // 82 declared on the class itself (not just inherited)
Math::class.memberFunctions.size // 3, all the rest are Java static methods
Math::class.declaredMemberFunctions.size // 0, no instance methods declared on the class itself (as this Java class is not meant to be instantiated)
t

TwoClocks

08/23/2021, 9:55 PM
hmm.. very helpful.. thanks!
12 Views