https://kotlinlang.org logo
Title
c

Czar

04/30/2018, 11:18 AM
can I mark something as @Deprecated for Kotlin, but not for java? I have some java methods which in Kotlin can be made generic utilizing reified types, for that reason I've written kotlin adapters for them. So on call site I'd like java style
doSomething(Some::class.java)
to be marked as deprecated in kotlin code, and kotlin-style
doSomething<Some>
to be suggested, while in java it should not be marked deprecated.
o

orangy

04/30/2018, 12:10 PM
I wouldn’t do it, some day your Kotlin code will implement Java interface and receive a
Class
instance.
c

Czar

04/30/2018, 12:49 PM
Hm... you're probably right, thanks.