ken
02/13/2020, 9:33 PMGetSubclassNamehere???
with whichever subclass called the someMethod().
abstract class A<T> {
fun someMethod(item: T?) {
try {
if (item == null) {
println("GetSubclassNamehere??? received null item")
return
}
} catch (e: Exception) {
}
}
}
class B : A<String>() {
}
fun main() {
val b: A<String> = B()
b.someMethod(null)
}
diesieben07
02/13/2020, 9:34 PMthis.javaClass.name
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/java-class.htmlken
02/13/2020, 9:41 PM