Cleanup: fix some compiler warnings (mostly deprecations, javaClass)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user