Class references

The class reference is represented by the instance of the KClass class. To obtain the reference to a class, you can use the :: operator, as follows:

JUnitPlatform::class

Take into account that an instance of KClass isn't the same as an instance of Class in Java. To obtain a Java class reference, you can use the java property of a KClass class property.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.7.208