juangamnik
07/17/2016, 2:57 PM// not so ugly variant for Java
public SomeReturnType <F extends Foo> doGenericFoo(F genericFoo) {
return _doGenericFoo(Foo.class, genericFoo);
}
// Supplemented method used with Kotlin with implicit parameter
public SomeReturnType <F extends Foo> _doGenericFoo(Class<F> _thissType, F genericFoo) {
// do what this method does.
}
If you call the method from Java, the class is always „reified“ to the upper bound...