[ObjCExport] Document getObjCClassOrProtocolName
^KT-65670 Fixed
This commit is contained in:
committed by
Space Team
parent
436e16efd8
commit
b7de3709e4
+19
@@ -10,6 +10,25 @@ import org.jetbrains.kotlin.analysis.api.symbols.*
|
|||||||
import org.jetbrains.kotlin.backend.konan.objcexport.ObjCExportClassOrProtocolName
|
import org.jetbrains.kotlin.backend.konan.objcexport.ObjCExportClassOrProtocolName
|
||||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.capitalizeAsciiOnly
|
import org.jetbrains.kotlin.util.capitalizeDecapitalize.capitalizeAsciiOnly
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs the name of the given [KtClassLikeSymbol] by composing
|
||||||
|
* ```
|
||||||
|
* {Current Framework Name}{Additional Module Prefix}{ObjC Class or Protocol Name}
|
||||||
|
* (1) (2) (3)
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* 1) Current Framework Name: See [KtObjCExportConfiguration.frameworkName]
|
||||||
|
* 2) Additional Module Prefix: Dependency modules that are not directly exported will add the prefix to distinguish from which
|
||||||
|
* dependency module a symbol came from. Note: This module name can be abbreviated e.g. `LongModuleName` will be `LMN`
|
||||||
|
* 3) ObjC Class or Protocol Name: This is either the name of the symbol, or the defined name in the `ObjCName` annotation
|
||||||
|
* (see [resolveObjCNameAnnotation]): e.g.
|
||||||
|
* ```
|
||||||
|
* @ObjCName("ObjCFoo")
|
||||||
|
* class Foo
|
||||||
|
* ```
|
||||||
|
* will use `ObjCFoo` instead of the class name `Foo`
|
||||||
|
*
|
||||||
|
*/
|
||||||
context(KtAnalysisSession, KtObjCExportSession)
|
context(KtAnalysisSession, KtObjCExportSession)
|
||||||
fun KtClassLikeSymbol.getObjCClassOrProtocolName(): ObjCExportClassOrProtocolName {
|
fun KtClassLikeSymbol.getObjCClassOrProtocolName(): ObjCExportClassOrProtocolName {
|
||||||
val resolvedObjCNameAnnotation = resolveObjCNameAnnotation()
|
val resolvedObjCNameAnnotation = resolveObjCNameAnnotation()
|
||||||
|
|||||||
Reference in New Issue
Block a user