Cleanup: fix some compiler warnings (mostly deprecations, javaClass)

This commit is contained in:
Mikhail Glukhikh
2017-02-21 17:38:43 +03:00
parent d0cc1635db
commit b121bf8802
445 changed files with 773 additions and 949 deletions
@@ -21,11 +21,11 @@ import java.lang.reflect.*
class InstanceComponentDescriptor(val instance: Any) : ComponentDescriptor {
override fun getValue(): Any = instance
override fun getRegistrations(): Iterable<Type> = instance.javaClass.getInfo().registrations
override fun getRegistrations(): Iterable<Type> = instance::class.java.getInfo().registrations
override fun getDependencies(context: ValueResolveContext): Collection<Class<*>> = emptyList()
override fun toString(): String {
return "Instance: ${instance.javaClass.simpleName}"
return "Instance: ${instance::class.java.simpleName}"
}
}
@@ -174,7 +174,7 @@ class ComponentStorage(val myId: String, parent: ComponentStorage?) : ValueResol
}
private fun injectProperties(instance: Any, context: ValueResolveContext) {
val classInfo = instance.javaClass.getInfo()
val classInfo = instance::class.java.getInfo()
classInfo.setterInfos.forEach { (method) ->
val methodBinding = method.bindToMethod(context)