Paul Woitaschek
11/09/2017, 1:26 PMclass.name
?Czar
11/09/2017, 1:28 PMclass SomeClass {
val name = // ???
}
stan0
11/09/2017, 1:32 PMSomeClass.name
or something similarPaul Woitaschek
11/09/2017, 1:33 PMclass SomeClass {
val name = javaClass.name
}
snrostov
11/09/2017, 2:03 PMjavaClass
is deprecated in favor ::class.java
?Czar
11/10/2017, 6:59 AMval name: String = javaClass.name
vs val name: String get() = this::class.java.name
and I haven't seen any deprecation warning anywhere regarding javaClass, have I missed something?snrostov
11/10/2017, 7:07 AMKClass<T>.javaClass
is depricated.
@Deprecated("Use 'java' property to get Java class corresponding to this Kotlin class or cast this instance to Any if you really want to get the runtime Java class of this implementation of KClass.", ReplaceWith("(this as Any).javaClass"), level = DeprecationLevel.ERROR)
This is in 1.2snrostov
11/10/2017, 7:09 AM@Deprecated("Use class literal and extension property `js` instead.", replaceWith = ReplaceWith("this::class.js"),
Czar
11/10/2017, 10:14 AM