Hello,
I am using Kotlin reflection to scan for annotations in classes. However, when I get the super class with “javaClass.superclass” of a class it gets stuck in an infinite loop because it sees Java “Object” as a class. The native Java method “getSuperClass” returns null when the super class is of type Object, interface, a primitive type or void (as stated in JavaDoc).
How can I detect in Kotlin if the superclass is not of type Object, interface, a primitive type or void?