singletonObjectReference

fun singletonObjectReference(loadedClass: Class<*>): Any?(source)

A Kotlin object declaration defines a (static) singleton object within the underlying synthetic class defined with a class name the same as the name of the object. This function returns the associated object reference as an Any reference or null.

Return

the reference to the object as an Any, null if not available

Parameters

loadedClass

the name of the object that was declared by object definition


fun singletonObjectReference(singletonName: String): Any?(source)

A Kotlin object declaration defines a (static) singleton object within the underlying synthetic class defined with a class name the same as the name of the object. This function returns the associated object reference as an Any reference or null.

Return

the reference to the object as an Any, null if not available

Parameters

singletonName

the name of the object that was declared by object definition