I'm wanting to write a function where I can have an argument that is a class type, so that I can make the code nicer, and inside that function do the ::class.java on it, so I can then pass that to the Java function it calls. This function needs to be able to take a variety of class types. I know the below code isn't quite right, wondering if possible/how I can achieve:
fun myFunc(clazz: KClass<T>) {
someJavaFunction(clazz.java)
}
class Foo() { ... }
class Bar() { ... }
myFunc(Foo)
myFunc(Bar)