[K/N] Add ObjCName annotation (#4815)
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
package kotlin.native
|
||||
|
||||
import kotlin.experimental.ExperimentalObjCName
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
/**
|
||||
@@ -83,3 +84,19 @@ public annotation class EagerInitialization
|
||||
@Target(AnnotationTarget.FUNCTION)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
public actual annotation class CName(actual val externName: String = "", actual val shortName: String = "")
|
||||
|
||||
/**
|
||||
* Instructs the Kotlin compiler to use a custom Objective-C and/or Swift name for this class, property, parameter or function.
|
||||
* @param exact specifies if the name of a class should be interpreted as the exact name.
|
||||
* E.g. the compiler won't add a top level prefix or the outer class names to exact names.
|
||||
*/
|
||||
@Target(
|
||||
AnnotationTarget.CLASS,
|
||||
AnnotationTarget.PROPERTY,
|
||||
AnnotationTarget.VALUE_PARAMETER,
|
||||
AnnotationTarget.FUNCTION
|
||||
)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
@MustBeDocumented
|
||||
@ExperimentalObjCName
|
||||
public actual annotation class ObjCName(actual val name: String = "", actual val swiftName: String = "", actual val exact: Boolean = false)
|
||||
|
||||
Reference in New Issue
Block a user