Is it possible to get the class of generic abstrac...
# announcements
a
Is it possible to get the class of generic abstract class in kotlin?. Please let me know
Copy code
abstract class ResultCallback<T:Any>{


    abstract fun onResponse(data : T)
    abstract fun onError(exception: Exception?)

    fun getTypeClass():Class<T>{
        
        //return class of T
    }



}
// somewhere else 
val result = ResultCallback<String>(){
override fun onResponse(data: String) {

           

            }

            override fun onError(exception: Exception?) {

            }
}