is there anyway to annotate a method such that the...
# announcements
w
is there anyway to annotate a method such that there is a warning if it is called from kotlin code, but nothing happens if it is called from java? There are several edge cases where I want to expose a different API to java consumers for the legacy portion of my code base, but I don’t want to encourage the usage of it from the newer kotlin code
m
I don't think OptIn triggers warnings from Java, but it does from Kotlin.
w
excellent
thanks
y
You could also do
@Deprecated(visibility = HIDDEN)