kristofdho
10/28/2017, 1:16 PMFoo
, I don't like that i have to specify the type and the class reference
interface SomeInterface
class SomeImplementation: SomeInterface
abstract class Foo<in T : SomeInterface>(private val clazz: Class<T>){
abstract fun foo(something: T)
}
class Bar: Foo<SomeImplementation>(SomeImplementation::class.java) {
override fun foo(something: SomeImplementation) {
// do something
}
}