apatrida
09/30/2015, 4:41 PMinline fun <reified T: Any, R: Any> ApplicationContext.getOtherBean(clz: Class<T>): R = this.getBean(typeRef<T>())
notice that the clz
parameter isn't used, it just allows T to come in reified. But it breaks if people call it with getOtherBean(MyClass::class.java)
vs. getOtherBean<MyClass<WithGenerics>>(clz))
because they would result in two different Types