Add documentation for @JvmSynthetic
This commit is contained in:
committed by
Ilya Gorbunov
parent
4f3f4dd025
commit
58becffb1f
@@ -65,6 +65,15 @@ public actual annotation class JvmMultifileClass
|
||||
@SinceKotlin("1.2")
|
||||
internal annotation class JvmPackageName(val name: String)
|
||||
|
||||
/**
|
||||
* Sets `ACC_SYNTHETIC` flag on the annotated target in the Java bytecode.
|
||||
*
|
||||
* Synthetic targets become inaccessible for Java sources at compile time while still being accessible for Kotlin sources.
|
||||
* Marking target as synthetic is a binary compatible change, already compiled Java code will be able to access such target.
|
||||
*
|
||||
* This annotation is intended for *rare cases* when API designer needs to hide Kotlin-specific target from Java API
|
||||
* while keeping it a part of Kotlin API so the resulting API is idiomatic for both languages.
|
||||
*/
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.FIELD)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
public annotation class JvmSynthetic
|
||||
|
||||
Reference in New Issue
Block a user