poohbar
08/12/2022, 3:17 PM::class
?
val c1 = Int::class.java to 42::class.java
c1.first to c1.second // (int, int)
val c2 = Int::class.java to 42
c2.first to c2.second::class.java // (int, class java.lang.Integer)
class java.lang.Integer
) from the primitive class object (int
)?Joffrey
08/12/2022, 3:20 PM::class
on a value that was previously boxed (when being stored in a generic Pair
object), it's not the same as calling it on an unboxed literalpoohbar
08/12/2022, 3:21 PMClassUtils.primitiveToWrapper(x)
looking at their implementation, they just keep a hardcoded map of primitives to boxed types.. nothing clever about itString::class.java.kotlin
ephemient
08/12/2022, 3:51 PMInt::class.javaObjectType
Int::class.javaPrimitiveType