diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportCodeSpec.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportCodeSpec.kt index 7e6f8f78705ee..397e0126d28d0 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportCodeSpec.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportCodeSpec.kt @@ -90,7 +90,9 @@ internal fun ObjCExportedInterface.createCodeSpec(symbolTable: SymbolTable): Obj if (descriptor.kind == ClassKind.ENUM_CLASS) { descriptor.enumEntries.mapTo(methods) { - ObjCGetterForKotlinEnumEntry(symbolTable.descriptorExtension.referenceEnumEntry(it), namer.getEnumEntrySelector(it)) + ObjCGetterForKotlinEnumEntry( + symbolTable.descriptorExtension.referenceEnumEntry(it), + namer.getEnumEntryName(it).objCName) } descriptor.getEnumValuesFunctionDescriptor()?.let { @@ -133,7 +135,7 @@ internal fun createObjCMethodSpecBaseMethod( ): ObjCMethodSpec.BaseMethod { require(mapper.isBaseMethod(descriptor)) - val selector = namer.getSelector(descriptor) + val selector = namer.getFunctionName(descriptor).objCName val bridge = mapper.bridgeMethod(descriptor) return ObjCMethodSpec.BaseMethod(symbol, bridge, selector) diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/analysisApiUtils/errors.kt b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/analysisApiUtils/errors.kt index 0430e79142442..d6d205bbb31c3 100644 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/analysisApiUtils/errors.kt +++ b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/analysisApiUtils/errors.kt @@ -51,7 +51,7 @@ internal val KtObjCExportSession.errorInterface returnType = ObjCInstanceType, selectors = listOf("init"), parameters = emptyList(), - attributes = listOf("swift_name(\"init()\")", "objc_designated_initializer") + attributes = listOf("objc_designated_initializer") ), ObjCMethod( comment = null, diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/analysisApiUtils/getDefaultSuperClassOrProtocolName.kt b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/analysisApiUtils/getDefaultSuperClassOrProtocolName.kt index d830e51e7f284..395112d1223f7 100644 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/analysisApiUtils/getDefaultSuperClassOrProtocolName.kt +++ b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/analysisApiUtils/getDefaultSuperClassOrProtocolName.kt @@ -8,7 +8,7 @@ import org.jetbrains.kotlin.objcexport.getObjCKotlinStdlibClassOrProtocolName * Some entities like top level functions are wrapped into classes with Base super class. * * @interface FooKt : Base - * + (NSString *)myTopLevelFunction __attribute__((swift_name("myTopLevelFunction()"))); + * + (NSString *)myTopLevelFunction; * @end */ internal fun KtObjCExportSession.getDefaultSuperClassOrProtocolName(): ObjCExportClassOrProtocolName { diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/buildCompanionProperty.kt b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/buildCompanionProperty.kt index 1d2e82e5ad9f0..8e44ee14e25e2 100644 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/buildCompanionProperty.kt +++ b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/buildCompanionProperty.kt @@ -37,6 +37,6 @@ internal fun ObjCExportContext.buildCompanionProperty(classSymbol: KaClassSymbol }), propertyAttributes = listOf("class", "readonly"), getterName = propertyName, - declarationAttributes = listOf(swiftNameAttribute(propertyName)) + declarationAttributes = emptyList(), ) } diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/buildThrowableAsErrorMethod.kt b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/buildThrowableAsErrorMethod.kt index 9792ee9bb6040..1b7be12ba920b 100644 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/buildThrowableAsErrorMethod.kt +++ b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/buildThrowableAsErrorMethod.kt @@ -14,7 +14,7 @@ internal fun buildThrowableAsErrorMethod(): ObjCMethod { returnType = ObjCClassType("NSError"), selectors = listOf("asError"), parameters = emptyList(), - attributes = listOf(swiftNameAttribute("asError()")), + attributes = emptyList(), origin = null ) } \ No newline at end of file diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/ObjCMethodMangler.kt b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/ObjCMethodMangler.kt index 7a3b662233acc..600b3edf84178 100644 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/ObjCMethodMangler.kt +++ b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/ObjCMethodMangler.kt @@ -18,37 +18,35 @@ import org.jetbrains.kotlin.backend.konan.objcexport.swiftNameAttribute */ internal class ObjCMethodMangler { - private val mangledMethods = mutableMapOf() + private val mangledMethods = mutableSetOf() fun mangle(member: ObjCExportStub, containingStub: ObjCExportStub): ObjCExportStub { - if (!member.isSwiftNameMethod()) return member - require(member is ObjCMethod) - if (!contains(member)) { - cacheMember(member) - return member - } else { - val key = getMemberKey(member) - val attribute = mangledMethods[key] ?: error("No cached item for $member") - val mangledAttribute = attribute.mangleAttribute() - val cloned = member.copy( - mangledSelectors = buildMangledSelectors(mangledAttribute), - mangledParameters = buildMangledParameters(mangledAttribute), - swiftNameAttribute = buildMangledSwiftNameMethodAttribute(mangledAttribute, containingStub), - containingStubName = containingStub.name - ) - mangledMethods[key] = mangledAttribute - return cloned + if (member is ObjCMethod) { + var cloned: ObjCMethod = member + while (true) { + val key = getMemberKey(cloned) + if (!mangledMethods.contains(key)) { + mangledMethods.add(key) + return cloned + } + val newSelectors = cloned.selectors.toMutableList() + val lastIndex = newSelectors.lastIndex + var lastSelector = newSelectors[lastIndex] + if (lastSelector.endsWith(":")) { + // - (void)foo:; -> -(void)foo_:; + // - (void)foo:bar:; -> -(void)foo:bar_:; + lastSelector = lastSelector.dropLast(1) + "_:" + } else { + // - (void)foo; -> -(void)foo_; + lastSelector += "_" + } + newSelectors[lastIndex] = lastSelector + cloned = member.copy( + mangledSelectors = newSelectors, + containingStubName = containingStub.name + ) + } } - } - - private fun contains(member: ObjCExportStub): Boolean { - if (!member.isSwiftNameMethod()) return false - return mangledMethods[getMemberKey(member as ObjCMethod)] != null - } - - private fun cacheMember(member: ObjCMethod) { - val memberKey = getMemberKey(member) - val swiftNameAttr = getSwiftNameAttribute(member) - mangledMethods[memberKey] = parseSwiftMethodNameAttribute(swiftNameAttr, member.returnType == ObjCInstanceType, member.parameters) + return member } } \ No newline at end of file diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/ObjCPropertyMangler.kt b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/ObjCPropertyMangler.kt index 26c400bd98641..f239347954a99 100644 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/ObjCPropertyMangler.kt +++ b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/ObjCPropertyMangler.kt @@ -14,39 +14,33 @@ class ObjCPropertyMangler { private val mangledProperties = hashSetOf() fun mangle(member: ObjCExportStub, containingStub: ObjCExportStub): ObjCExportStub { - return if (member.isSwiftNameProperty()) { - val key = getSwiftNameAttribute(member as ObjCProperty) - if (mangledProperties.contains(key)) { + return if (member is ObjCProperty) { + val name = member.name + if (mangledProperties.contains(name)) { val copy = if (containingStub.isExtensionFacade) { - val attr = parseSwiftPropertyNameAttribute(getSwiftNameAttribute(member)) member.copy( - name = member.name + "_", + name = name + "_", propertyAttributes = null, - declarationAttributes = listOf(buildMangledSwiftNamePropertyAttribute(attr.mangleAttribute())) + declarationAttributes = null ) } else { member.copy( - name = member.name, - propertyAttributes = "getter=${member.name}_", + name = name, + propertyAttributes = "getter=${name}_", declarationAttributes = null ) } - mangledProperties.add(getSwiftNameAttribute(copy)) copy } else { - mangledProperties.add(key) + mangledProperties.add(name) member } - } else if (member.isSwiftNameMethod()) { - mangledProperties.add(getSwiftNameAttribute(member as ObjCMethod).replace("()", "")) + } else if (member is ObjCMethod && member.selectors.size == 1 && member.parameters.isEmpty()) { + mangledProperties.add(member.selectors[0]) member } else { // Leave it as it is since it is neither property, nor method member } } -} - -private fun buildMangledSwiftNamePropertyAttribute(attribute: ObjCMemberDetails): String { - return "swift_name(\"${attribute.name + attribute.postfix}\")" } \ No newline at end of file diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/copyObjCStub.kt b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/copyObjCStub.kt index 95cc8b7f0f2a5..1b965af2872ba 100644 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/copyObjCStub.kt +++ b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/copyObjCStub.kt @@ -27,14 +27,12 @@ internal fun ObjCProperty.copy( */ internal fun ObjCMethod.copy( mangledSelectors: List, - mangledParameters: List, - swiftNameAttribute: String, containingStubName: String, ): ObjCMethod { val selectorsSize = mangledSelectors.size val parametersSize = this.parameters.size val methodName = this.name - require((selectorsSize == parametersSize) || (selectorsSize == 1 && mangledParameters.isEmpty())) { + require((selectorsSize == parametersSize) || (selectorsSize == 1 && parametersSize == 0)) { "'$containingStubName.$methodName': selectors of doesn't match parameters count: " + "selectors($mangledSelectors): $selectorsSize, " + "parameters(${this.parameters.joinToString { it.name }}): $parametersSize" @@ -47,9 +45,70 @@ internal fun ObjCMethod.copy( selectors = mangledSelectors, parameters = this.parameters, attributes = this.attributes.map { attr -> - if (attr.startsWith("swift_name")) swiftNameAttribute else attr + if (attr.startsWith("swift_name")) remangledSwiftName(mangledSelectors, this.attributes) else attr }, extras = this.extras ) +} -} \ No newline at end of file +/** + * Create a swift name based on the selectors and attributes. + */ +internal fun ObjCMethod.remangledSwiftName(mangledSelectors: List, attributes: List): String { + fun isConstructor(attributes: List) : Boolean { + return attributes.contains("objc_designated_initializer") + } + + val swiftName = StringBuilder("swift_name(\"") + val count = if (mangledSelectors[0].endsWith(":")) mangledSelectors.size else mangledSelectors.size - 1 + if (count == 0) { + // - (void)bar; -> bar() + swiftName.append(mangledSelectors[0] + "()") + } else { + val selector = mangledSelectors[0] + val lastUppercaseChar = selector.indexOfLast { it.isUpperCase() } + if (isConstructor(attributes)) { + // - (instancetype)initWithA:...; -> init(a:) + var prefix = selector.take(lastUppercaseChar) + if (prefix.endsWith("With")) { + prefix = prefix.dropLast(4) + } + swiftName.append( + prefix + + "(" + + selector.substring(lastUppercaseChar).replaceFirstChar { it.lowercase() }) + } else if (lastUppercaseChar == -1 && selector.endsWith("_:")) { + //- (Foo *)days_... -> days(__:...) + //- (Foo *)days__... -> days(___:...) + val index = selector.indexOf("_") + swiftName.append(selector.substring(0, index) + "(") + for (i in index until selector.length) { + swiftName.append("_") + } + swiftName.append(":") + } else { + if (lastUppercaseChar == -1) { + // - (void)bar:; -> bar:(_) + swiftName.append(selector.dropLast(1) + "(_") + if (count > 1) { + // - (void)bar:...; -> bar:(_:... + swiftName.append(":") + } + } else { + // - (void)doBar:...; -> do(bar:...) + swiftName.append( + selector.take(lastUppercaseChar) + + "(" + + selector.substring(lastUppercaseChar).replaceFirstChar { it.lowercase() }) + } + } + if (count > 1) { + for (i in 1 until count) { + swiftName.append(mangledSelectors[i]) + } + } + swiftName.append(")") + } + swiftName.append("\")") + return swiftName.toString() +} diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/mangleObjCMethods.kt b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/mangleObjCMethods.kt index dbde768c31537..8c6cc9738582a 100644 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/mangleObjCMethods.kt +++ b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/mangleObjCMethods.kt @@ -12,156 +12,29 @@ internal fun ObjCExportContext.mangleObjCMethods( if (!stubs.hasMethodConflicts()) return stubs val mangler = ObjCMethodMangler() return stubs.map { member -> - if (member.isSwiftNameMethod()) mangler.mangle(member, containingStub) - else member + mangler.mangle(member, containingStub) }.map { stub -> mangleObjCMemberGenerics(stub) } } -internal fun buildMangledSelectors(attribute: ObjCMemberDetails): List { - val with = if (attribute.isConstructor) "With" else "" - return if (attribute.parameters.isEmpty()) - listOf(attribute.name + attribute.postfix) - else if (attribute.parameters.size == 1) { - val mangledAttribute = (attribute.name + with + attribute.parameters.first() - .replaceFirstChar { it.uppercaseChar() }).mangleSelector(attribute.postfix) - if (attribute.parameters.first() == "_:") { - /** - * Function with single parameter and name "_" is an extension function. - * Where receiver is passed as a parameter with name "_". - * It is a special mangling case. - * - * ```kotlin - * class Foo { - * fun Int.bar() = Foo() - * } - * ``` - * ```c - * interface Foo { - * - (Foo *)bar:(int_32_t)receiver __attribute__((swift_name("days(_:)"))); - * } - * ``` - * - * So when there is another extension function with the same name we mangle: - * - swift_name parameter - * - selector - * - * ```kotlin - * class Foo { - * fun Int.bar() = Foo() - * fun Double.bar() = Foo() - * } - * ``` - * ```c - * interface Foo { - * - (Foo *)bar:(int_32_t)receiver __attribute__((swift_name("days(_:)"))); - * - (Foo *)bar_:(double)receiver __attribute__((swift_name("days(__:)"))); - * } - * ``` - * - * We add '_' to swift_attribute parameter and keep selector with one less '_' char: - * - bar > _ - * - bar_ > __ - * - bar__ > ___ - * etc - */ - listOf("${mangledAttribute.dropLast(2)}:") - } else { - /** - * If extension function has parameters we have the same amount of `_` for selector and parameter: - * - bar param > _:param - * - bar param_ > _:param_ - * - bar param__ > _:param__ - * etc - */ - listOf(mangledAttribute) - } - - } else { - attribute.parameters.mapIndexed { index, param -> - when (index) { - 0 -> { - if (param.isReceiver) { - attribute.name + ":" - } else { - /** First selector is a combination of a method name and first parameter */ - attribute.name + with + param.replaceFirstChar { it.uppercaseChar() } - } - } - /** Last selector always mangled */ - attribute.parameters.size - 1 -> param.mangleSelector(attribute.postfix) - /** Middle selectors remain unchanged */ - else -> param - } - }.toList() - } -} - - -internal fun buildMangledSwiftNameMethodAttribute(attribute: ObjCMemberDetails, containingStub: ObjCExportStub): String { - val parameters = attribute.parameters - val parametersWithoutError = if (attribute.hasErrorParameter) parameters.dropLast(1) else parameters - val mangledParameters = parametersWithoutError.mapIndexed { index, parameter -> - if (index == parametersWithoutError.size - 1) parameter.mangleSelector(attribute.postfix) - else parameter - } - - val name = if (containingStub.isExtensionFacade && parametersWithoutError.isEmpty()) { - attribute.name + attribute.postfix - } else attribute.name - - return "swift_name(\"${name}(${mangledParameters.joinToString(separator = "")})\")" -} - -internal fun buildMangledParameters(attribute: ObjCMemberDetails): List { - return attribute.parameters.mapIndexed { index, parameter -> - when (index) { - /** Last parameter goes always mangled */ - attribute.parameters.size - 1 -> parameter + attribute.postfix - /** Other parameters remain unchanged */ - else -> parameter - } - } -} - -internal fun ObjCExportStub.isSwiftNameMethod(): Boolean { - return this is ObjCMethod && isSwiftNameMethod() -} - -internal fun ObjCMethod.isSwiftNameMethod(): Boolean { - return attributes.firstOrNull { attr -> attr.startsWith("swift_name") } != null -} - -internal fun ObjCMemberDetails.mangleAttribute(): ObjCMemberDetails { - return ObjCMemberDetails(name, parameters, isConstructor, postfix + "_", hasErrorParameter = hasErrorParameter) -} - /** * Determines if methods conflicts exist by comparing `swift_name` attribute. * This function isn't for optimization; it avoids handling complex edge case later during mangling. */ internal fun List.hasMethodConflicts(): Boolean { - val swiftNameAttributes = mutableSetOf() + val keys = mutableSetOf() forEach { method -> - if (method is ObjCMethod && method.isSwiftNameMethod()) { - val swiftNameAttribute = getMemberKey(method) - if (swiftNameAttributes.add(swiftNameAttribute)) return true + if (method is ObjCMethod) { + val key = getMemberKey(method) + if (keys.add(key)) return true } } return false } -internal val String.isReceiver: Boolean - get() { - return this == "_:" - } - internal val ObjCMethod.isInstance: String get() { return if (this.isInstanceMethod) "+" else "-" } internal fun getMemberKey(method: ObjCMethod) = - method.isInstance + getSwiftNameAttribute(method) - -internal fun getSwiftNameAttribute(method: ObjCMethod) = - method.attributes.first { attr -> attr.startsWith("swift_name") } \ No newline at end of file + method.isInstance + method.selectors.joinToString("") \ No newline at end of file diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/mangleObjCProperties.kt b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/mangleObjCProperties.kt index f9bf818595e61..a3894c850ddd2 100644 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/mangleObjCProperties.kt +++ b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/mangleObjCProperties.kt @@ -13,31 +13,18 @@ internal fun ObjCExportContext.mangleObjCProperties(stubs: List) }.map { stub -> mangleObjCMemberGenerics(stub) } } -internal fun getSwiftNameAttribute(property: ObjCProperty) = - property.declarationAttributes.first { attr -> attr.startsWith("swift_name") } - /** * Determines if properties conflicts exist by comparing `swift_name` attribute. * This function isn't for optimization; it avoids handling complex edge case later during mangling. */ internal fun List.hasPropertiesConflicts(): Boolean { - val swiftNameAttributes = hashSetOf() + val selectors = hashSetOf() forEach { member -> - if (member is ObjCMethod && member.isSwiftNameMethod()) { - val attr = getSwiftNameAttribute(member).replace("()", "") - swiftNameAttributes.add(attr) - } else if (member is ObjCProperty && member.isSwiftNameProperty()) { - val attr = getSwiftNameAttribute(member) - if (!swiftNameAttributes.add(attr)) return true + if (member is ObjCMethod && member.selectors.size == 1 && member.parameters.isEmpty()) { + if (!selectors.add(member.selectors[0])) return true + } else if (member is ObjCProperty) { + if (!selectors.add(member.name)) return true } } return false -} - -internal fun ObjCExportStub.isSwiftNameProperty(): Boolean { - return (this as? ObjCProperty)?.isSwiftNameProperty() ?: false -} - -internal fun ObjCProperty.isSwiftNameProperty(): Boolean { - return declarationAttributes.firstOrNull { attr -> attr.startsWith("swift_name") } != null } \ No newline at end of file diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/parseSwiftNameAttribute.kt b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/parseSwiftNameAttribute.kt deleted file mode 100644 index fe010c7415743..0000000000000 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/parseSwiftNameAttribute.kt +++ /dev/null @@ -1,75 +0,0 @@ -package org.jetbrains.kotlin.objcexport.mangling - -import org.jetbrains.kotlin.backend.konan.objcexport.ObjCParameter -import org.jetbrains.kotlin.objcexport.analysisApiUtils.errorParameterName -import org.jetbrains.kotlin.objcexport.extras.isErrorParameter - -private val swiftNameRegex = """^swift_name\("([^"]+)"\)$""".toRegex() - -internal fun parseSwiftPropertyNameAttribute(attribute: String): ObjCMemberDetails { - val swiftNameMatch = swiftNameRegex.find(attribute) - if (swiftNameMatch != null) { - val propertyName = swiftNameMatch.groupValues[1] - return ObjCMemberDetails(propertyName, emptyList()) - } else error("Invalid swift_name property attribute: $attribute") -} - -internal fun parseSwiftMethodNameAttribute( - attribute: String, - isConstructor: Boolean = false, - parameters: List = emptyList(), -): ObjCMemberDetails { - val swiftNameMatch = swiftNameRegex.find(attribute) - if (swiftNameMatch != null) { - val swiftName = swiftNameMatch.groupValues[1] - - val methodName = swiftName.extractMethodName() - val parameterNames = parseSwiftNameParameters(swiftName) - - if (!methodName.isNullOrEmpty()) { - val hasErrorParameter = parameters.any { parameter -> parameter.isErrorParameter } - return ObjCMemberDetails( - name = methodName, - parameters = parameterNames + if (hasErrorParameter) listOf("$errorParameterName:") else emptyList(), - isConstructor = isConstructor, - hasErrorParameter = hasErrorParameter - ) - } else error("Invalid name and parameters of swift_name attribute: $attribute") - } else error("Invalid swift_name method attribute: $attribute") -} - -internal data class ObjCMemberDetails( - val name: String, - val parameters: List, - val isConstructor: Boolean = false, - val postfix: String = "", - val hasErrorParameter: Boolean = false, -) - -/** - * foo(a:b:) -> [a:, b:] - */ -internal fun parseSwiftNameParameters(swiftNameValue: String): List { - val functionPattern = Regex("""\w+\((.*?)\)""") - val match = functionPattern.matchEntire(swiftNameValue.trim()) - - return when { - match != null -> { - val params = match.groupValues[1] - if (params.isBlank()) emptyList() - else { - params.split(':') - .filter { it.isNotEmpty() } - .map { param -> "$param:" } - } - } - else -> emptyList() - } -} - -/** - * `foo(bar) -> foo - */ -internal fun String?.extractMethodName(): String? { - return this?.substringBefore('(') -} \ No newline at end of file diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/readme.md b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/readme.md index c6b4a84da91bd..3a3aff81f89b3 100644 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/readme.md +++ b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/mangling/readme.md @@ -30,9 +30,9 @@ interface Foo { ``` ```c @protocol - (void) bar - @property (readonly, getter=bar_) bar - @property (readonly) uniqProp + - (void)bar; + @property(readonly, getter=bar_) int bar; + @property(readonly) int uniqProp; @end ``` ## Methods @@ -47,9 +47,9 @@ class Foo { ``` ```c @interface Foo - (void) barValue:(Int) value __attribute__((swift_name("bar(value:)"))); - (void) barValue_:(String) value __attribute__((swift_name("bar(value_:)"))); - (void) barValue__:(Boolean) value __attribute__((swift_name("bar(value__:)"))); + (void)barValue:(int)value; + (void)barValue_:(NSString *)value; + (void)barValue__:(BOOL)value; @end ``` ### More than 1 parameter: add `_` to the last parameter @@ -62,9 +62,9 @@ class Foo { ``` ```c @interface Foo - (void) barValue:(Int) value1 (String) value2 (Boolean) value3 __attribute__((swift_name("bar(value1:value2:value3:)"))); - (void) barValue:(Boolean) value1 (Int) value2 (String) value3_ __attribute__((swift_name("bar(value1:value2:value3_:)"))); - (void) barValue:(String) value1 (Boolean) value2 (Int) value3__ __attribute__((swift_name("bar(value1:value2:value3__:)"))); + (void)barValue:(int)value1 value2:(NSString *)value2 value3:(BOOL)value3; + (void)barValue:(BOOL)value1 value2:(int)value2 value3_:(NSString *)value3; + (void)barValue:(NSString *)value1 value2:(BOOL)value2 value3__:(int)value3; @end ``` @@ -107,10 +107,10 @@ fun Bar.funcName() = Unit ```c @interface Foo -- funcName __attribute__((swift_name("funcName()"))); +- (void)funcName; @end @interface Bar -- funcName_ __attribute__((swift_name("funcName_()"))); +- (void)funcName_; @end ``` @@ -126,9 +126,9 @@ val Bar.prop: Int = 42 ```c @interface Foo -@property prop int __attribute__((swift_name("prop"))); +@property int prop ; @end @interface Bar -@property prop_ int __attribute__((swift_name("prop_"))); +@property int prop_; @end ``` \ No newline at end of file diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateEnumMembers.kt b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateEnumMembers.kt index c2ec41e5d005f..f6938d4fb89e9 100644 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateEnumMembers.kt +++ b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateEnumMembers.kt @@ -22,19 +22,22 @@ internal fun ObjCExportContext.translateEnumMembers(symbol: KaClassSymbol): List } private fun ObjCExportContext.getEnumEntries(symbol: KaClassSymbol): List { - val staticMembers = with(analysisSession) { symbol.staticDeclaredMemberScope }.callables.toList() return staticMembers.filterIsInstance().map { entry -> val entryName = getEnumEntryName(entry, false) val swiftName = getEnumEntryName(entry, true) + val attributes = mutableListOf() + if (entryName != swiftName || entryName[0].isUpperCase()) { + attributes.add(swiftNameAttribute(swiftName)) + } ObjCProperty( name = entryName, comment = null, origin = null, type = mapToReferenceTypeIgnoringNullability(entry.returnType), propertyAttributes = listOf("class", "readonly"), - declarationAttributes = listOf(swiftNameAttribute(swiftName)) + declarationAttributes = attributes ) } } @@ -51,7 +54,7 @@ private fun ObjCExportContext.getEnumValuesMethod(symbol: KaClassSymbol): ObjCMe returnType = if (returnType == null) ObjCIdType else translateToObjCReferenceType(returnType), selectors = listOf("values"), parameters = emptyList(), - attributes = listOf(swiftNameAttribute("values()")), + attributes = emptyList(), origin = null ) } @@ -68,7 +71,7 @@ private fun ObjCExportContext.getEnumEntriesProperty(symbol: KaClassSymbol): Obj comment = null, type = if (returnType == null) ObjCIdType else translateToObjCReferenceType(returnType), propertyAttributes = listOf("class", "readonly"), - declarationAttributes = listOf(swiftNameAttribute("entries")), + declarationAttributes = emptyList(), origin = null, setterName = null, getterName = null diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateToObjCMethod.kt b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateToObjCMethod.kt index fd119e62638ab..24616dbe509f4 100644 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateToObjCMethod.kt +++ b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateToObjCMethod.kt @@ -55,8 +55,6 @@ internal fun ObjCExportContext.buildObjCMethod( val parameters = translateToObjCParameters(symbol, bridge) val selector = getSelector(symbol, bridge) val selectors = splitSelector(selector) - val swiftName = getSwiftName(symbol, bridge) - val returnBridge = bridge.returnBridge val comment = analysisSession.translateToObjCComment(symbol, bridge, parameters) val throws = analysisSession.getDefinedThrows(symbol).map { it }.toList() @@ -65,8 +63,16 @@ internal fun ObjCExportContext.buildObjCMethod( fun buildAttributes(mangleNameAttribute: (String) -> String = { it }): List { val attributes = mutableListOf() - val swiftNameAttribute = symbol.getSwiftPrivateAttribute() ?: swiftNameAttribute(mangleNameAttribute(swiftName)) - attributes += swiftNameAttribute + val privateAttribute = symbol.getSwiftPrivateAttribute() + if (privateAttribute != null) { + attributes.add(privateAttribute) + } else { + val swiftName = getSwiftName(symbol, bridge) + val mangledName = mangleNameAttribute(swiftName) + if ("$selector()" != mangledName || selector[0].isUpperCase()) { + attributes.add(swiftNameAttribute(mangledName)) + } + } if (returnBridge is MethodBridge.ReturnValue.WithError.ZeroForError && returnBridge.successMayBeZero) { // Method may return zero on success, but diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateToObjCObject.kt b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateToObjCObject.kt index f948064ff725d..e53d1ae935c10 100644 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateToObjCObject.kt +++ b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateToObjCObject.kt @@ -66,7 +66,7 @@ private fun ObjCExportContext.getDefaultMembers(symbol: KaClassSymbol, members: type = toPropertyType(symbol), propertyAttributes = listOf("class", "readonly"), getterName = getObjectPropertySelector(symbol), - declarationAttributes = listOf(swiftNameAttribute(ObjCPropertyNames.objectPropertyName)), + declarationAttributes = emptyList(), origin = analysisSession.getObjCExportStubOrigin(symbol), ) ) diff --git a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateToObjCProperty.kt b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateToObjCProperty.kt index a05784d4c1233..2e06dec4e5384 100644 --- a/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateToObjCProperty.kt +++ b/native/objcexport-header-generator/impl/analysis-api/src/org/jetbrains/kotlin/objcexport/translateToObjCProperty.kt @@ -25,13 +25,18 @@ fun ObjCExportContext.translateToObjCProperty(symbol: KaPropertySymbol): ObjCPro fun ObjCExportContext.buildProperty(symbol: KaPropertySymbol): ObjCProperty { val propertyName = getObjCPropertyName(symbol) val objCName = propertyName.objCName - val swiftName = propertyName.swiftName val symbolGetter = symbol.getter val getterBridge = if (symbolGetter == null) error("KtPropertySymbol.getter is undefined") else getFunctionMethodBridge(symbolGetter) val type = mapReturnType(symbolGetter, getterBridge.returnBridge) val attributes = mutableListOf() - val declarationAttributes = mutableListOf(symbol.getSwiftPrivateAttribute() ?: swiftNameAttribute(swiftName)) - + val declarationAttributes = mutableListOf() + val privateAttribute = symbol.getSwiftPrivateAttribute() + if (privateAttribute != null) { + declarationAttributes.add(privateAttribute) + } + if (propertyName.needsSwiftNameAttribute()) { + declarationAttributes.add(swiftNameAttribute(propertyName.swiftName)) + } if (!analysisSession.getBridgeReceiverType(symbol).isInstance) attributes += "class" if (symbol.setter == null || !analysisSession.isVisibleInObjC(symbol.setter)) { diff --git a/native/objcexport-header-generator/impl/analysis-api/test/org/jetbrains/kotlin/objcexport/tests/mangling/CopyStubsTest.kt b/native/objcexport-header-generator/impl/analysis-api/test/org/jetbrains/kotlin/objcexport/tests/mangling/CopyStubsTest.kt index 3c271b6fee6b1..ef6ca088196a6 100644 --- a/native/objcexport-header-generator/impl/analysis-api/test/org/jetbrains/kotlin/objcexport/tests/mangling/CopyStubsTest.kt +++ b/native/objcexport-header-generator/impl/analysis-api/test/org/jetbrains/kotlin/objcexport/tests/mangling/CopyStubsTest.kt @@ -44,8 +44,6 @@ class CopyStubsTest { ) val copy = objCMethod.copy( mangledSelectors = listOf("foo_"), - mangledParameters = listOf("p0:"), - swiftNameAttribute = "swift_name(foo_(p0))", containingStubName = "ContainingStub", ) assertTrue { diff --git a/native/objcexport-header-generator/impl/analysis-api/test/org/jetbrains/kotlin/objcexport/tests/mangling/ManglingUtilsTest.kt b/native/objcexport-header-generator/impl/analysis-api/test/org/jetbrains/kotlin/objcexport/tests/mangling/ManglingUtilsTest.kt index ed4aee12a4ac1..34bf3d2ec29c4 100644 --- a/native/objcexport-header-generator/impl/analysis-api/test/org/jetbrains/kotlin/objcexport/tests/mangling/ManglingUtilsTest.kt +++ b/native/objcexport-header-generator/impl/analysis-api/test/org/jetbrains/kotlin/objcexport/tests/mangling/ManglingUtilsTest.kt @@ -1,8 +1,5 @@ package org.jetbrains.kotlin.objcexport.tests.mangling -import org.jetbrains.kotlin.objcexport.mangling.isReceiver -import org.jetbrains.kotlin.objcexport.mangling.isSwiftNameMethod -import org.jetbrains.kotlin.objcexport.mangling.isSwiftNameProperty import org.jetbrains.kotlin.objcexport.mangling.mangleSelector import org.jetbrains.kotlin.objcexport.testUtils.objCInitMethod import org.jetbrains.kotlin.objcexport.testUtils.objCMethod @@ -18,28 +15,4 @@ class ManglingUtilsTest { assertEquals("a_:", "a:".mangleSelector("_")) assertEquals("a_", "a".mangleSelector("_")) } - - @Test - fun `test - isSwiftNameProperty`() { - assertTrue(objCProperty(declarationAttributes = listOf("swift_name")).isSwiftNameProperty()) - assertFalse(objCProperty(declarationAttributes = listOf("deprecated")).isSwiftNameProperty()) - } - - @Test - fun `test - isSwiftNameMethod`() { - assertTrue( - objCMethod( - selector = "foo", - attributes = listOf("swift_name(\"foo()\")") - ).isSwiftNameMethod() - ) - - assertFalse(objCMethod(selector = "foo", attributes = listOf("deprecated")).isSwiftNameMethod()) - assertFalse(objCInitMethod().isSwiftNameMethod()) - } - - @Test - fun `test - isReceiver`() { - assertTrue("_:".isReceiver) - } } \ No newline at end of file diff --git a/native/objcexport-header-generator/impl/analysis-api/test/org/jetbrains/kotlin/objcexport/tests/mangling/ParseSwiftNameAttributeTest.kt b/native/objcexport-header-generator/impl/analysis-api/test/org/jetbrains/kotlin/objcexport/tests/mangling/ParseSwiftNameAttributeTest.kt deleted file mode 100644 index fc9e72598bbf2..0000000000000 --- a/native/objcexport-header-generator/impl/analysis-api/test/org/jetbrains/kotlin/objcexport/tests/mangling/ParseSwiftNameAttributeTest.kt +++ /dev/null @@ -1,154 +0,0 @@ -package org.jetbrains.kotlin.objcexport.tests.mangling - -import org.jetbrains.kotlin.objcexport.mangling.* -import org.junit.jupiter.api.Test -import kotlin.test.assertEquals -import kotlin.test.assertFails - -class ParseSwiftNameAttributeTest { - - @Test - fun `test - no parameters`() { - assertEquals( - ObjCMemberDetails("foo", emptyList()), - parseSwiftMethodNameAttribute("swift_name(\"foo()\")") - ) - } - - @Test - fun `test - multiple parameters`() { - assertEquals( - ObjCMemberDetails("foo", listOf("p0:", "p1:")), - parseSwiftMethodNameAttribute("swift_name(\"foo(p0:p1:)\")") - ) - } - - @Test - fun `test - receiver`() { - assertEquals( - ObjCMemberDetails("foo", listOf("_:", "p0:")), - parseSwiftMethodNameAttribute("swift_name(\"foo(_:p0:)\")") - ) - } - - @Test - fun `test - invalid attribute name`() { - assertFails { - parseSwiftMethodNameAttribute("swift(\"foo(p0:)\")") - } - } - - @Test - fun `test - no method name`() { - assertFails { - parseSwiftMethodNameAttribute("swift_name(\"(p0:)\")") - } - } - - @Test - fun `test - building non mangled selectors with no parameters`() { - assertEquals( - listOf("foo"), - buildMangledSelectors(ObjCMemberDetails("foo", emptyList(), false, "")) - ) - } - - @Test - fun `test - building mangled selectors with no parameters`() { - assertEquals( - listOf("foo_"), - buildMangledSelectors(ObjCMemberDetails("foo", emptyList(), false, "_")) - ) - } - - @Test - fun `test - building mangled selectors with 1 parameter`() { - val attr = ObjCMemberDetails( - name = "foo", - parameters = listOf("p0:"), - postfix = "_" - ) - assertEquals( - listOf("fooP0_:"), - buildMangledSelectors(attr) - ) - } - - @Test - fun `test - building mangled selectors with 2 parameters`() { - val attr = ObjCMemberDetails( - name = "foo", - parameters = listOf("p0:", "p1:"), - postfix = "_" - ) - assertEquals( - listOf("fooP0:", "p1_:"), - buildMangledSelectors(attr) - ) - } - - @Test - fun `test - building mangled selectors with 3 parameters`() { - val attr = ObjCMemberDetails( - name = "foo", - parameters = listOf("p0:", "p1:", "p2:"), - postfix = "_" - ) - assertEquals( - listOf("fooP0:", "p1:", "p2_:"), - buildMangledSelectors(attr) - ) - } - - @Test - fun `test - attribute mangling`() { - assertEquals( - ObjCMemberDetails( - name = "foo", - parameters = listOf("p0:"), - postfix = "__" - ), - ObjCMemberDetails( - name = "foo", - parameters = listOf("p0:"), - postfix = "_" - ).mangleAttribute() - ) - } - - @Test - fun `test - method name with mangling prefix`() { - - assertEquals( - ObjCMemberDetails("_pack", emptyList()), - parseSwiftMethodNameAttribute("swift_name(\"_pack()\")") - ) - - assertEquals( - ObjCMemberDetails("_foo", listOf("bar:")), - parseSwiftMethodNameAttribute("swift_name(\"_foo(bar)\")") - ) - } - - @Test - fun `test - dropping parameters with brackets`() { - assertEquals("foo", "foo()".extractMethodName()) - assertEquals("foo", "foo(a:)".extractMethodName()) - assertEquals("foo", "foo(a:b:)".extractMethodName()) - } - - @Test - fun `test - swift name parameters parsing`() { - assertEquals(emptyList(), parseSwiftNameParameters("foo()")) - assertEquals(listOf("a:"), parseSwiftNameParameters("foo(a:)")) - assertEquals(listOf("a:", "b:"), parseSwiftNameParameters("foo(a:b:)")) - } - - @Test - fun `test - invalid swift_name method format`() { - assertEquals(emptyList(), parseSwiftNameParameters("foo")) - assertEquals(emptyList(), parseSwiftNameParameters("")) - assertEquals(emptyList(), parseSwiftNameParameters("foo(")) - assertEquals(emptyList(), parseSwiftNameParameters("foo)")) - } -} \ No newline at end of file diff --git a/native/objcexport-header-generator/impl/k1/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportNamer.kt b/native/objcexport-header-generator/impl/k1/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportNamer.kt index 863a7a610597c..ce45728b10f32 100644 --- a/native/objcexport-header-generator/impl/k1/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportNamer.kt +++ b/native/objcexport-header-generator/impl/k1/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportNamer.kt @@ -56,6 +56,16 @@ interface ObjCExportNamer { override val objCName: String, ) : ObjCExportPropertyName + data class FunctionName( + override val swiftName: String, + override val objCName: String, + ) : ObjCExportFunctionName + + data class EnumEntryName( + override val swiftName: String, + override val objCName: String, + ) : ObjCExportEnumEntryName + interface Configuration { val topLevelNamePrefix: String fun getAdditionalPrefix(module: ModuleDescriptor): String? @@ -77,13 +87,11 @@ interface ObjCExportNamer { fun getFileClassName(file: SourceFile): ClassOrProtocolName fun getClassOrProtocolName(descriptor: ClassDescriptor): ClassOrProtocolName - fun getSelector(method: FunctionDescriptor): String fun getParameterName(parameter: ParameterDescriptor): String - fun getSwiftName(method: FunctionDescriptor): String + fun getFunctionName(method: FunctionDescriptor): FunctionName fun getPropertyName(property: PropertyDescriptor): PropertyName fun getObjectInstanceSelector(descriptor: ClassDescriptor): String - fun getEnumEntrySelector(descriptor: ClassDescriptor): String - fun getEnumEntrySwiftName(descriptor: ClassDescriptor): String + fun getEnumEntryName(descriptor: ClassDescriptor) : EnumEntryName fun getEnumStaticMemberSelector(descriptor: CallableMemberDescriptor): String fun getTypeParameterName(typeParameterDescriptor: TypeParameterDescriptor): String @@ -543,92 +551,98 @@ class ObjCExportNamerImpl( override fun getParameterName(parameter: ParameterDescriptor): String = parameter.getObjCName().asString(forSwift = false) - override fun getSelector(method: FunctionDescriptor): String = methodSelectors.getOrPut(method) { - assert(mapper.isBaseMethod(method)) + override fun getFunctionName(method: FunctionDescriptor): ObjCExportNamer.FunctionName { + fun swiftName(method: FunctionDescriptor): String = methodSwiftNames.getOrPut(method) { + assert(mapper.isBaseMethod(method)) - getPredefined(method, Predefined.anyMethodSelectors)?.let { return it } + getPredefined(method, Predefined.anyMethodSwiftNames)?.let { return it } - val parameters = mapper.bridgeMethod(method).valueParametersAssociated(method) + val parameters = mapper.bridgeMethod(method).valueParametersAssociated(method) - StringBuilder().apply { - append(method.getMangledName(forSwift = false)) - - parameters.forEachIndexed { index, (bridge, it) -> - val name = when (bridge) { - is MethodBridgeValueParameter.Mapped -> when { - it is ReceiverParameterDescriptor -> it.getObjCName().asIdentifier(false) { "" } - method is PropertySetterDescriptor -> when (parameters.size) { - 1 -> "" - else -> "value" + StringBuilder().apply { + append(method.getMangledName(forSwift = true)) + append("(") + + parameters@ for ((bridge, it) in parameters) { + val label = when (bridge) { + is MethodBridgeValueParameter.Mapped -> when { + it is ReceiverParameterDescriptor -> it.getObjCName().asIdentifier(true) { "_" } + method is PropertySetterDescriptor -> when (parameters.size) { + 1 -> "_" + else -> "value" + } + else -> it!!.getObjCName().asIdentifier(true) } - else -> it!!.getObjCName().asIdentifier(false) + MethodBridgeValueParameter.ErrorOutParameter -> continue@parameters + is MethodBridgeValueParameter.SuspendCompletion -> "completionHandler" } - MethodBridgeValueParameter.ErrorOutParameter -> "error" - is MethodBridgeValueParameter.SuspendCompletion -> "completionHandler" - } - if (index == 0) { - append( - when { - bridge is MethodBridgeValueParameter.ErrorOutParameter -> "AndReturn" - bridge is MethodBridgeValueParameter.SuspendCompletion -> "With" - method is ConstructorDescriptor -> "With" - else -> "" - } - ) - append(name.replaceFirstChar(Char::uppercaseChar)) - } else { - append(name) + append(label) + append(":") } - append(':') - } - }.mangledSequence { - if (parameters.isNotEmpty()) { - // "foo:" -> "foo_:" - insert(lastIndex, '_') - } else { - // "foo" -> "foo_" - append("_") + append(")") + }.mangledSequence { + // "foo(label:)" -> "foo(label_:)" + // "foo()" -> "foo_()" + insert(lastIndex - 1, '_') } } - } - override fun getSwiftName(method: FunctionDescriptor): String = methodSwiftNames.getOrPut(method) { - assert(mapper.isBaseMethod(method)) + fun objCName(method: FunctionDescriptor): String = methodSelectors.getOrPut(method) { + assert(mapper.isBaseMethod(method)) - getPredefined(method, Predefined.anyMethodSwiftNames)?.let { return it } + getPredefined(method, Predefined.anyMethodSelectors)?.let { return it } - val parameters = mapper.bridgeMethod(method).valueParametersAssociated(method) + val parameters = mapper.bridgeMethod(method).valueParametersAssociated(method) - StringBuilder().apply { - append(method.getMangledName(forSwift = true)) - append("(") - - parameters@ for ((bridge, it) in parameters) { - val label = when (bridge) { - is MethodBridgeValueParameter.Mapped -> when { - it is ReceiverParameterDescriptor -> it.getObjCName().asIdentifier(true) { "_" } - method is PropertySetterDescriptor -> when (parameters.size) { - 1 -> "_" - else -> "value" + StringBuilder().apply { + append(method.getMangledName(forSwift = false)) + + parameters.forEachIndexed { index, (bridge, it) -> + val name = when (bridge) { + is MethodBridgeValueParameter.Mapped -> when { + it is ReceiverParameterDescriptor -> it.getObjCName().asIdentifier(false) { "" } + method is PropertySetterDescriptor -> when (parameters.size) { + 1 -> "" + else -> "value" + } + else -> it!!.getObjCName().asIdentifier(false) } - else -> it!!.getObjCName().asIdentifier(true) + MethodBridgeValueParameter.ErrorOutParameter -> "error" + is MethodBridgeValueParameter.SuspendCompletion -> "completionHandler" } - MethodBridgeValueParameter.ErrorOutParameter -> continue@parameters - is MethodBridgeValueParameter.SuspendCompletion -> "completionHandler" - } - append(label) - append(":") - } + if (index == 0) { + append( + when { + bridge is MethodBridgeValueParameter.ErrorOutParameter -> "AndReturn" + bridge is MethodBridgeValueParameter.SuspendCompletion -> "With" + method is ConstructorDescriptor -> "With" + else -> "" + } + ) + append(name.replaceFirstChar(Char::uppercaseChar)) + } else { + append(name) + } - append(")") - }.mangledSequence { - // "foo(label:)" -> "foo(label_:)" - // "foo()" -> "foo_()" - insert(lastIndex - 1, '_') + append(':') + } + }.mangledSequence { + if (parameters.isNotEmpty()) { + // "foo:" -> "foo_:" + insert(lastIndex, '_') + } else { + // "foo" -> "foo_" + append("_") + } + } } + return ObjCExportNamer.FunctionName( + swiftName = swiftName(method), + objCName = objCName(method) + ) } private fun getPredefined(method: FunctionDescriptor, predefinedForAny: Map): T? { @@ -677,20 +691,18 @@ class ObjCExportNamerImpl( return StringBuilder(name).mangledBySuffixUnderscores() } - override fun getEnumEntrySelector(descriptor: ClassDescriptor): String { + override fun getEnumEntryName(descriptor: ClassDescriptor): ObjCExportNamer.EnumEntryName { assert(descriptor.kind == ClassKind.ENUM_ENTRY) - return enumClassSelectors.getOrPut(descriptor) { - descriptor.getEnumEntryName(false) - } - } - - override fun getEnumEntrySwiftName(descriptor: ClassDescriptor): String { - assert(descriptor.kind == ClassKind.ENUM_ENTRY) + return ObjCExportNamer.EnumEntryName( + swiftName = enumClassSwiftNames.getOrPut(descriptor) { + descriptor.getEnumEntryName(true) + }, + objCName = enumClassSwiftNames.getOrPut(descriptor) { + descriptor.getEnumEntryName(false) + } - return enumClassSwiftNames.getOrPut(descriptor) { - descriptor.getEnumEntryName(true) - } + ) } override fun getEnumStaticMemberSelector(descriptor: CallableMemberDescriptor): String { diff --git a/native/objcexport-header-generator/impl/k1/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportTranslator.kt b/native/objcexport-header-generator/impl/k1/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportTranslator.kt index 280f43af52df2..f94a87262dcc8 100644 --- a/native/objcexport-header-generator/impl/k1/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportTranslator.kt +++ b/native/objcexport-header-generator/impl/k1/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportTranslator.kt @@ -254,7 +254,7 @@ class ObjCExportTranslatorImpl( mapReferenceType(descriptor.companionObjectDescriptor!!.defaultType, genericExportScope), listOf("class", "readonly"), getterName = namer.getCompanionObjectPropertySelector(descriptor), - declarationAttributes = listOf(swiftNameAttribute(ObjCExportNamer.companionObjectPropertyName)) + declarationAttributes = emptyList() ) } } @@ -277,7 +277,7 @@ class ObjCExportTranslatorImpl( ObjCExportNamer.objectPropertyName, null, mapReferenceType(descriptor.defaultType, genericExportScope), listOf("class", "readonly"), getterName = namer.getObjectPropertySelector(descriptor), - declarationAttributes = listOf(swiftNameAttribute(ObjCExportNamer.objectPropertyName)) + declarationAttributes = emptyList() ) } } @@ -285,22 +285,27 @@ class ObjCExportTranslatorImpl( val type = mapType(descriptor.defaultType, ReferenceBridge, ObjCRootExportScope) descriptor.enumEntries.forEach { - val entryName = namer.getEnumEntrySelector(it) - val swiftName = namer.getEnumEntrySwiftName(it) + val enumEntryName = namer.getEnumEntryName(it) + val declarationAttrs = if (enumEntryName.needsSwiftNameAttribute()) { + listOf(swiftNameAttribute(enumEntryName.swiftName)) + } else { + emptyList() + } + val objCName = enumEntryName.objCName add { ObjCProperty( - entryName, it, type, listOf("class", "readonly"), - declarationAttributes = listOf(swiftNameAttribute(swiftName)) + objCName, it, type, listOf("class", "readonly"), + declarationAttributes = declarationAttrs ) } - if (namer.needsExplicitMethodFamily(entryName)) { + if (namer.needsExplicitMethodFamily(objCName)) { add { ObjCMethod( null, null, false, type, - listOf(entryName), + listOf(objCName), emptyList(), listOf(OBJC_METHOD_FAMILY_NONE), ) @@ -364,7 +369,7 @@ class ObjCExportTranslatorImpl( returnType = ObjCClassType("NSError"), selectors = listOf(asError), parameters = emptyList(), - attributes = listOf(swiftNameAttribute("$asError()")) + attributes = emptyList() ) } @@ -388,7 +393,7 @@ class ObjCExportTranslatorImpl( returnType = mapReferenceType(enumValues.returnType!!, genericExportScope), selectors = splitSelector(selector), parameters = emptyList(), - attributes = listOf(swiftNameAttribute("$selector()")) + attributes = emptyList() ) } @@ -402,7 +407,7 @@ class ObjCExportTranslatorImpl( enumEntries, type = mapReferenceType(enumEntries.type, genericExportScope), propertyAttributes = listOf("class", "readonly"), - declarationAttributes = listOf(swiftNameAttribute(selector)) + declarationAttributes = emptyList() ) } @@ -459,7 +464,7 @@ class ObjCExportTranslatorImpl( mapper.getBaseMethods(method) .makeMethodsOrderStable() .asSequence() - .distinctBy { namer.getSelector(it) } + .distinctBy { namer.getFunctionName(it).objCName } .forEach { base -> add { buildMethod(method, base, objCExportScope) } } } @@ -534,7 +539,7 @@ class ObjCExportTranslatorImpl( // TODO: consider checking that signatures for bases with same selector/name are equal. private fun getSelector(method: FunctionDescriptor): String { - return namer.getSelector(method) + return namer.getFunctionName(method).objCName } private fun buildProperty( @@ -560,7 +565,9 @@ class ObjCExportTranslatorImpl( val propertySetter = property.setter // Note: the condition below is similar to "toObjCMethods" logic in [ObjCExportedInterface.createCodeSpec]. if (propertySetter != null && mapper.shouldBeExposed(propertySetter)) { - val setterSelector = mapper.getBaseMethods(propertySetter).map { namer.getSelector(it) }.distinct().single() + val setterSelector = mapper.getBaseMethods(propertySetter).map { + namer.getFunctionName(it).objCName + }.distinct().single() setterName = if (setterSelector != "set" + name.replaceFirstChar(Char::uppercaseChar) + ":") setterSelector else null } else { attributes += "readonly" @@ -570,7 +577,13 @@ class ObjCExportTranslatorImpl( val getterSelector = getSelector(baseProperty.getter!!) val getterName: String? = if (getterSelector != name) getterSelector else null - val declarationAttributes = mutableListOf(property.getSwiftPrivateAttribute() ?: swiftNameAttribute(propertyName.swiftName)) + val declarationAttributes = mutableListOf() + val privateAttribute: String? = property.getSwiftPrivateAttribute() + if (privateAttribute != null) { + declarationAttributes.add(privateAttribute) + } else if (propertyName.needsSwiftNameAttribute()) { + declarationAttributes.add(swiftNameAttribute(propertyName.swiftName)) + } declarationAttributes.addIfNotNull(mapper.getDeprecation(property)?.toDeprecationAttribute()) val visibilityComments = visibilityComments(property.visibility, "property") @@ -657,10 +670,14 @@ class ObjCExportTranslatorImpl( val parameters = collectParameters(baseMethodBridge, method) val selector = getSelector(baseMethod) val selectorParts: List = splitSelector(selector) - val swiftName = namer.getSwiftName(baseMethod) + val functionName = namer.getFunctionName(baseMethod) val attributes = mutableListOf() - - attributes += method.getSwiftPrivateAttribute() ?: swiftNameAttribute(swiftName) + val privateAttribute: String? = method.getSwiftPrivateAttribute() + if (privateAttribute != null) { + attributes.add(privateAttribute) + } else if (functionName.needsSwiftNameAttribute()) { + attributes.add(swiftNameAttribute(functionName.swiftName)) + } val returnBridge = baseMethodBridge.returnBridge if (returnBridge is MethodBridge.ReturnValue.WithError.ZeroForError && returnBridge.successMayBeZero) { @@ -680,7 +697,7 @@ class ObjCExportTranslatorImpl( attributes.addIfNotNull(getDeprecationAttribute(method)) } - if (namer.needsExplicitMethodFamily(namer.getSelector(baseMethod)) && baseMethod !is ConstructorDescriptor) { + if (namer.needsExplicitMethodFamily(namer.getFunctionName(baseMethod).objCName) && baseMethod !is ConstructorDescriptor) { attributes += OBJC_METHOD_FAMILY_NONE } @@ -1138,8 +1155,9 @@ fun ClassDescriptor.needCompanionObjectProperty(namer: ObjCExportNamer, mapper: if (companionObject == null || !mapper.shouldBeExposed(companionObject)) return false if (kind == ClassKind.ENUM_CLASS && enumEntries.any { - namer.getEnumEntrySelector(it) == ObjCExportNamer.companionObjectPropertyName || - namer.getEnumEntrySwiftName(it) == ObjCExportNamer.companionObjectPropertyName + val enumEntryName = namer.getEnumEntryName(it) + enumEntryName.objCName == ObjCExportNamer.companionObjectPropertyName || + enumEntryName.swiftName == ObjCExportNamer.companionObjectPropertyName } ) return false // 'companion' property would clash with enum entry, don't generate it. diff --git a/native/objcexport-header-generator/impl/k1/test/org/jetbrains/kotlin/backend/konan/tests/ObjCExportNamerTest.kt b/native/objcexport-header-generator/impl/k1/test/org/jetbrains/kotlin/backend/konan/tests/ObjCExportNamerTest.kt index d5bc09e75d3ec..8b5edbff9ca8c 100644 --- a/native/objcexport-header-generator/impl/k1/test/org/jetbrains/kotlin/backend/konan/tests/ObjCExportNamerTest.kt +++ b/native/objcexport-header-generator/impl/k1/test/org/jetbrains/kotlin/backend/konan/tests/ObjCExportNamerTest.kt @@ -72,16 +72,26 @@ class ObjCExportNamerTest : InlineSourceTestEnvironment { fun `test - simple function`() { val module = createModuleDescriptor("fun foo() = 42") val foo = module.getPackage(FqName.ROOT).memberScope.findSingleFunction(Name.identifier("foo")) - assertEquals("foo()", createObjCExportNamer().getSwiftName(foo)) - assertEquals("foo", createObjCExportNamer().getSelector(foo)) + val functionName = createObjCExportNamer().getFunctionName(foo) + assertEquals("foo()", functionName.swiftName) + assertEquals("foo", functionName.objCName) + } + + @Test + fun `test - function starting with uppercase needs a swift name attribute`() { + val module = createModuleDescriptor("fun Foo() = 42") + val foo = module.getPackage(FqName.ROOT).memberScope.findSingleFunction(Name.identifier("Foo")) + val functionName = createObjCExportNamer().getFunctionName(foo) + assert(functionName.needsSwiftNameAttribute()) } @Test fun `test - function with parameters`() { val module = createModuleDescriptor("fun foo(a: Int, b: Int) = a + b") val foo = module.getPackage(FqName.ROOT).memberScope.findSingleFunction(Name.identifier("foo")) - assertEquals("foo(a:b:)", createObjCExportNamer().getSwiftName(foo)) - assertEquals("fooA:b:", createObjCExportNamer().getSelector(foo)) + val functionName = createObjCExportNamer().getFunctionName(foo) + assertEquals("foo(a:b:)", functionName.swiftName) + assertEquals("fooA:b:", functionName.objCName) } @Test @@ -91,6 +101,14 @@ class ObjCExportNamerTest : InlineSourceTestEnvironment { assertEquals(PropertyName("foo", "foo"), createObjCExportNamer().getPropertyName(foo)) } + @Test + fun `test - property starting with uppercase needs a swift name attribute`() { + val module = createModuleDescriptor("val Foo = 42") + val foo = module.getPackage(FqName.ROOT).memberScope.findFirstVariable("Foo") { true }!! + val propertyName = createObjCExportNamer().getPropertyName(foo) + assert(propertyName.needsSwiftNameAttribute()) + } + @Test fun `test - simple property - with prefix`() { val module = createModuleDescriptor("val foo = 42") @@ -114,8 +132,9 @@ class ObjCExportNamerTest : InlineSourceTestEnvironment { val fooClass = module.findClassAcrossModuleDependencies(ClassId.fromString("bar/Foo"))!! val someFunction = fooClass.unsubstitutedMemberScope.findSingleFunction(Name.identifier("someFunction")) - assertEquals("someFunction(a:b:)", createObjCExportNamer().getSwiftName(someFunction)) - assertEquals("someFunctionA:b:", createObjCExportNamer().getSelector(someFunction)) + val functionName = createObjCExportNamer().getFunctionName(someFunction) + assertEquals("someFunction(a:b:)", functionName.swiftName) + assertEquals("someFunctionA:b:", functionName.objCName) } @Test @@ -197,9 +216,9 @@ class ObjCExportNamerTest : InlineSourceTestEnvironment { val foo = module.findClassAcrossModuleDependencies(ClassId.fromString("Foo"))!! val fooA = foo.enumEntries.find { it.name == Name.identifier("A") }!! val namer = createObjCExportNamer() - + val enumEntryName = namer.getEnumEntryName(fooA) assertEquals(ClassOrProtocolName("Foo", "Foo"), namer.getClassOrProtocolName(foo)) - assertEquals("a", namer.getEnumEntrySelector(fooA)) - assertEquals("a", namer.getEnumEntrySwiftName(fooA)) + assertEquals("a", enumEntryName.objCName) + assertEquals("a", enumEntryName.swiftName) } } diff --git a/native/objcexport-header-generator/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportName.kt b/native/objcexport-header-generator/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportName.kt index 8122553c2886f..9a7adde5bf938 100644 --- a/native/objcexport-header-generator/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportName.kt +++ b/native/objcexport-header-generator/src/org/jetbrains/kotlin/backend/konan/objcexport/ObjCExportName.kt @@ -16,9 +16,27 @@ interface ObjCExportClassOrProtocolName : ObjCExportName { val binaryName: String } -interface ObjCExportPropertyName : ObjCExportName +interface ObjCExportPropertyName : ObjCExportName { + fun needsSwiftNameAttribute(): Boolean { + // As per https://github.com/swiftlang/swift-evolution/blob/main/proposals/0005-objective-c-name-translation.md + return (objCName != swiftName) || (objCName[0].isUpperCase()) + } +} + +interface ObjCExportEnumEntryName : ObjCExportName { + fun needsSwiftNameAttribute(): Boolean { + // As per https://github.com/swiftlang/swift-evolution/blob/main/proposals/0005-objective-c-name-translation.md + return (objCName != swiftName) || (objCName[0].isUpperCase()) + } +} -interface ObjCExportFunctionName : ObjCExportName +interface ObjCExportFunctionName : ObjCExportName { + fun needsSwiftNameAttribute(): Boolean { + // As per https://github.com/swiftlang/swift-evolution/blob/main/proposals/0005-objective-c-name-translation.md + // This is a very simple implementation that could be enhanced significantly to remove more unneeded attributes. + return ("$objCName()" != swiftName) || (objCName[0].isUpperCase()) + } +} interface ObjCExportFileName : ObjCExportName @@ -54,6 +72,14 @@ fun ObjCExportFunctionName( objCName = objCName ) +fun ObjCExportEnumEntryName( + swiftName: String, + objCName: String, +): ObjCExportEnumEntryName = ObjCExportEnumEntryNameImpl( + swiftName = swiftName, + objCName = objCName +) + fun ObjCExportFileName( swiftName: String, objCName: String, @@ -72,6 +98,11 @@ private data class ObjCExportFunctionNameImpl( override val objCName: String, ) : ObjCExportFunctionName +private data class ObjCExportEnumEntryNameImpl( + override val swiftName: String, + override val objCName: String, +) : ObjCExportEnumEntryName + private data class ObjCExportFileNameImpl( override val swiftName: String, override val objCName: String, diff --git a/native/objcexport-header-generator/src/org/jetbrains/kotlin/backend/konan/objcexport/stubs.kt b/native/objcexport-header-generator/src/org/jetbrains/kotlin/backend/konan/objcexport/stubs.kt index d6fdf0fbad1dc..281a5a1198abe 100644 --- a/native/objcexport-header-generator/src/org/jetbrains/kotlin/backend/konan/objcexport/stubs.kt +++ b/native/objcexport-header-generator/src/org/jetbrains/kotlin/backend/konan/objcexport/stubs.kt @@ -129,7 +129,7 @@ class ObjCProperty( ) : ObjCExportStub private fun buildMethodName(selectors: List, parameters: List): String = - if (selectors.size == 1 && parameters.size == 0) { + if (selectors.size == 1 && parameters.isEmpty()) { selectors[0] } else { assert(selectors.size == parameters.size) { "selectors.size(${selectors.size}) != parameters.size(${parameters.size})" } diff --git a/native/objcexport-header-generator/testData/dependencies/array/!array.h b/native/objcexport-header-generator/testData/dependencies/array/!array.h index 356f4e0fb7b7f..7954961fb1202 100644 --- a/native/objcexport-header-generator/testData/dependencies/array/!array.h +++ b/native/objcexport-header-generator/testData/dependencies/array/!array.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) KotlinArray *a __attribute__((swift_name("a"))); +@property (class, readonly) KotlinArray *a; @end __attribute__((objc_subclassing_restricted)) @@ -33,15 +33,15 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/arrayList/!arrayList.h b/native/objcexport-header-generator/testData/dependencies/arrayList/!arrayList.h index a716c4fe12bb3..47a740fffbfb6 100644 --- a/native/objcexport-header-generator/testData/dependencies/arrayList/!arrayList.h +++ b/native/objcexport-header-generator/testData/dependencies/arrayList/!arrayList.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) NSMutableArray *a __attribute__((swift_name("a"))); +@property (class, readonly) NSMutableArray *a; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/classNameMangling/!classNameMangling.h b/native/objcexport-header-generator/testData/dependencies/classNameMangling/!classNameMangling.h index b382e13b8aa64..47bfa5bf971d9 100644 --- a/native/objcexport-header-generator/testData/dependencies/classNameMangling/!classNameMangling.h +++ b/native/objcexport-header-generator/testData/dependencies/classNameMangling/!classNameMangling.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end @@ -34,7 +34,7 @@ __attribute__((objc_subclassing_restricted)) __attribute__((objc_subclassing_restricted)) @interface Foo_ : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/dependencies/completionCoroutinesHandlerException/!completionCoroutinesHandlerException.h b/native/objcexport-header-generator/testData/dependencies/completionCoroutinesHandlerException/!completionCoroutinesHandlerException.h index 83cab38f5f965..1779ce3658175 100644 --- a/native/objcexport-header-generator/testData/dependencies/completionCoroutinesHandlerException/!completionCoroutinesHandlerException.h +++ b/native/objcexport-header-generator/testData/dependencies/completionCoroutinesHandlerException/!completionCoroutinesHandlerException.h @@ -24,11 +24,11 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) Kotlinx_coroutines_coreCompletionHandlerException * _Nullable handler __attribute__((swift_name("handler"))); +@property (class, readonly) Kotlinx_coroutines_coreCompletionHandlerException * _Nullable handler; @end @interface KotlinThrowable : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -38,16 +38,16 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlin.experimental.ExperimentalNativeApi */ -- (KotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); -- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) KotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); -@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); -- (NSError *)asError __attribute__((swift_name("asError()"))); +- (KotlinArray *)getStackTrace; +- (void)printStackTrace; +- (NSString *)description; +@property (readonly) KotlinThrowable * _Nullable cause; +@property (readonly) NSString * _Nullable message; +- (NSError *)asError; @end @interface KotlinException : KotlinThrowable -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -55,7 +55,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface KotlinRuntimeException : KotlinException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -65,7 +65,7 @@ __attribute__((objc_subclassing_restricted)) __attribute__((objc_subclassing_restricted)) @interface Kotlinx_coroutines_coreCompletionHandlerException : KotlinRuntimeException - (instancetype)initWithMessage:(NSString *)message cause:(KotlinThrowable *)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); +- (instancetype)init __attribute__((objc_designated_initializer)) __attribute__((unavailable)); + (instancetype)new __attribute__((unavailable)); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); @@ -77,15 +77,15 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/coroutineDispatcherKey/!coroutineDispatcherKey.h b/native/objcexport-header-generator/testData/dependencies/coroutineDispatcherKey/!coroutineDispatcherKey.h index e5865983585b9..e3fe037e67554 100644 --- a/native/objcexport-header-generator/testData/dependencies/coroutineDispatcherKey/!coroutineDispatcherKey.h +++ b/native/objcexport-header-generator/testData/dependencies/coroutineDispatcherKey/!coroutineDispatcherKey.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) Kotlinx_coroutines_coreCoroutineDispatcherKey * _Nullable key __attribute__((swift_name("key"))); +@property (class, readonly) Kotlinx_coroutines_coreCoroutineDispatcherKey * _Nullable key; @end @protocol KotlinCoroutineContextKey @@ -53,7 +53,7 @@ __attribute__((swift_name("Kotlinx_coroutines_coreCoroutineDispatcher.Key"))) + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithBaseKey:(id)baseKey safeCast:(id _Nullable (^)(id element))safeCast __attribute__((swift_name("init(baseKey:safeCast:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); + (instancetype)key __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) Kotlinx_coroutines_coreCoroutineDispatcherKey *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) Kotlinx_coroutines_coreCoroutineDispatcherKey *shared; @end @@ -71,7 +71,7 @@ __attribute__((swift_name("Kotlinx_coroutines_coreCoroutineDispatcher.Key"))) @protocol KotlinCoroutineContextElement @required -@property (readonly) id key __attribute__((swift_name("key"))); +@property (readonly) id key; @end @@ -92,14 +92,14 @@ __attribute__((swift_name("Kotlinx_coroutines_coreCoroutineDispatcher.Key"))) */ @interface KotlinAbstractCoroutineContextElement : Base - (instancetype)initWithKey:(id)key __attribute__((swift_name("init(key:)"))) __attribute__((objc_designated_initializer)); -@property (readonly) id key __attribute__((swift_name("key"))); +@property (readonly) id key; @end @interface Kotlinx_coroutines_coreCoroutineDispatcher : KotlinAbstractCoroutineContextElement -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithKey:(id)key __attribute__((swift_name("init(key:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) Kotlinx_coroutines_coreCoroutineDispatcherKey *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) Kotlinx_coroutines_coreCoroutineDispatcherKey *companion; - (void)dispatchContext:(id)context block:(id)block __attribute__((swift_name("dispatch(context:block:)"))); - (void)dispatchYieldContext:(id)context block:(id)block __attribute__((swift_name("dispatchYield(context:block:)"))); - (id)interceptContinuationContinuation:(id)continuation __attribute__((swift_name("interceptContinuation(continuation:)"))); @@ -112,7 +112,7 @@ __attribute__((swift_name("Kotlinx_coroutines_coreCoroutineDispatcher.Key"))) - (Kotlinx_coroutines_coreCoroutineDispatcher *)limitedParallelismParallelism:(int32_t)parallelism __attribute__((swift_name("limitedParallelism(parallelism:)"))); - (Kotlinx_coroutines_coreCoroutineDispatcher *)plusOther:(Kotlinx_coroutines_coreCoroutineDispatcher *)other __attribute__((swift_name("plus(other:)"))) __attribute__((unavailable("Operator '+' on two CoroutineDispatcher objects is meaningless. CoroutineDispatcher is a coroutine context element and `+` is a set-sum operator for coroutine contexts. The dispatcher to the right of `+` just replaces the dispatcher to the left."))); - (void)releaseInterceptedContinuationContinuation:(id)continuation __attribute__((swift_name("releaseInterceptedContinuation(continuation:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); +- (NSString *)description; @end @@ -123,12 +123,12 @@ __attribute__((swift_name("Kotlinx_coroutines_coreCoroutineDispatcher.Key"))) @protocol KotlinContinuation @required - (void)resumeWithResult:(id _Nullable)result __attribute__((swift_name("resumeWith(result:)"))); -@property (readonly) id context __attribute__((swift_name("context"))); +@property (readonly) id context; @end @protocol Kotlinx_coroutines_coreRunnable @required -- (void)run __attribute__((swift_name("run()"))); +- (void)run; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/dateTimeUnit/!dateTimeUnit.h b/native/objcexport-header-generator/testData/dependencies/dateTimeUnit/!dateTimeUnit.h index 9619db14704ba..0d7819226a0d2 100644 --- a/native/objcexport-header-generator/testData/dependencies/dateTimeUnit/!dateTimeUnit.h +++ b/native/objcexport-header-generator/testData/dependencies/dateTimeUnit/!dateTimeUnit.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) Kotlinx_datetimeDateTimeUnit * _Nullable foo __attribute__((swift_name("foo"))); +@property (class, readonly) Kotlinx_datetimeDateTimeUnit * _Nullable foo; @end @@ -33,7 +33,7 @@ __attribute__((objc_subclassing_restricted)) * kotlinx.serialization.Serializable(with=NormalClass(value=kotlinx/datetime/serializers/DateTimeUnitSerializer)) */ @interface Kotlinx_datetimeDateTimeUnit : Base -@property (class, readonly, getter=companion) Kotlinx_datetimeDateTimeUnitCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) Kotlinx_datetimeDateTimeUnitCompanion *companion; /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. @@ -53,8 +53,8 @@ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) Kotlinx_datetimeDateTimeUnitCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); +@property (class, readonly, getter=shared) Kotlinx_datetimeDateTimeUnitCompanion *shared; +- (id)serializer; @property (readonly) Kotlinx_datetimeDateTimeUnitMonthBased *CENTURY __attribute__((swift_name("CENTURY"))); @property (readonly) Kotlinx_datetimeDateTimeUnitDayBased *DAY __attribute__((swift_name("DAY"))); @property (readonly) Kotlinx_datetimeDateTimeUnitTimeBased *HOUR __attribute__((swift_name("HOUR"))); @@ -72,13 +72,13 @@ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.Companion"))) @protocol Kotlinx_serialization_coreSerializationStrategy @required - (void)serializeEncoder:(id)encoder value:(id _Nullable)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) id descriptor; @end @protocol Kotlinx_serialization_coreDeserializationStrategy @required - (id _Nullable)deserializeDecoder:(id)decoder __attribute__((swift_name("deserialize(decoder:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) id descriptor; @end @protocol Kotlinx_serialization_coreKSerializer @@ -92,7 +92,7 @@ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.Companion"))) */ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.DateBased"))) @interface Kotlinx_datetimeDateTimeUnitDateBased : Kotlinx_datetimeDateTimeUnit -@property (class, readonly, getter=companion) Kotlinx_datetimeDateTimeUnitDateBasedCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) Kotlinx_datetimeDateTimeUnitDateBasedCompanion *companion; @end @@ -104,12 +104,12 @@ __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.MonthBased"))) @interface Kotlinx_datetimeDateTimeUnitMonthBased : Kotlinx_datetimeDateTimeUnitDateBased - (instancetype)initWithMonths:(int32_t)months __attribute__((swift_name("init(months:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) Kotlinx_datetimeDateTimeUnitMonthBasedCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) Kotlinx_datetimeDateTimeUnitMonthBasedCompanion *companion; - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSUInteger)hash; - (Kotlinx_datetimeDateTimeUnitMonthBased *)timesScalar:(int32_t)scalar __attribute__((swift_name("times(scalar:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t months __attribute__((swift_name("months"))); +- (NSString *)description; +@property (readonly) int32_t months; @end @@ -121,12 +121,12 @@ __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.DayBased"))) @interface Kotlinx_datetimeDateTimeUnitDayBased : Kotlinx_datetimeDateTimeUnitDateBased - (instancetype)initWithDays:(int32_t)days __attribute__((swift_name("init(days:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) Kotlinx_datetimeDateTimeUnitDayBasedCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) Kotlinx_datetimeDateTimeUnitDayBasedCompanion *companion; - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSUInteger)hash; - (Kotlinx_datetimeDateTimeUnitDayBased *)timesScalar:(int32_t)scalar __attribute__((swift_name("times(scalar:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t days __attribute__((swift_name("days"))); +- (NSString *)description; +@property (readonly) int32_t days; @end @@ -138,13 +138,13 @@ __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.TimeBased"))) @interface Kotlinx_datetimeDateTimeUnitTimeBased : Kotlinx_datetimeDateTimeUnit - (instancetype)initWithNanoseconds:(int64_t)nanoseconds __attribute__((swift_name("init(nanoseconds:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) Kotlinx_datetimeDateTimeUnitTimeBasedCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) Kotlinx_datetimeDateTimeUnitTimeBasedCompanion *companion; - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSUInteger)hash; - (Kotlinx_datetimeDateTimeUnitTimeBased *)timesScalar:(int32_t)scalar __attribute__((swift_name("times(scalar:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int64_t duration __attribute__((swift_name("duration"))); -@property (readonly) int64_t nanoseconds __attribute__((swift_name("nanoseconds"))); +- (NSString *)description; +@property (readonly) int64_t duration; +@property (readonly) int64_t nanoseconds; @end @protocol Kotlinx_serialization_coreEncoder @@ -165,13 +165,13 @@ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.TimeBased"))) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (void)encodeNotNullMark __attribute__((swift_name("encodeNotNullMark()"))); +- (void)encodeNotNullMark; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (void)encodeNull __attribute__((swift_name("encodeNull()"))); +- (void)encodeNull; /** * @note annotations @@ -181,7 +181,7 @@ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.TimeBased"))) - (void)encodeSerializableValueSerializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeSerializableValue(serializer:value:)"))); - (void)encodeShortValue:(int16_t)value __attribute__((swift_name("encodeShort(value:)"))); - (void)encodeStringValue:(NSString *)value __attribute__((swift_name("encodeString(value:)"))); -@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule; @end @protocol Kotlinx_serialization_coreSerialDescriptor @@ -221,58 +221,58 @@ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.TimeBased"))) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) NSArray> *annotations __attribute__((swift_name("annotations"))); +@property (readonly) NSArray> *annotations; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) int32_t elementsCount __attribute__((swift_name("elementsCount"))); -@property (readonly) BOOL isInline __attribute__((swift_name("isInline"))); +@property (readonly) int32_t elementsCount; +@property (readonly) BOOL isInline; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) BOOL isNullable __attribute__((swift_name("isNullable"))); +@property (readonly) BOOL isNullable; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) Kotlinx_serialization_coreSerialKind *kind __attribute__((swift_name("kind"))); +@property (readonly) Kotlinx_serialization_coreSerialKind *kind; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) NSString *serialName __attribute__((swift_name("serialName"))); +@property (readonly) NSString *serialName; @end @protocol Kotlinx_serialization_coreDecoder @required - (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); -- (BOOL)decodeBoolean __attribute__((swift_name("decodeBoolean()"))); -- (int8_t)decodeByte __attribute__((swift_name("decodeByte()"))); -- (unichar)decodeChar __attribute__((swift_name("decodeChar()"))); -- (double)decodeDouble __attribute__((swift_name("decodeDouble()"))); +- (BOOL)decodeBoolean; +- (int8_t)decodeByte; +- (unichar)decodeChar; +- (double)decodeDouble; - (int32_t)decodeEnumEnumDescriptor:(id)enumDescriptor __attribute__((swift_name("decodeEnum(enumDescriptor:)"))); -- (float)decodeFloat __attribute__((swift_name("decodeFloat()"))); +- (float)decodeFloat; - (id)decodeInlineDescriptor:(id)descriptor __attribute__((swift_name("decodeInline(descriptor:)"))); -- (int32_t)decodeInt __attribute__((swift_name("decodeInt()"))); -- (int64_t)decodeLong __attribute__((swift_name("decodeLong()"))); +- (int32_t)decodeInt; +- (int64_t)decodeLong; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (BOOL)decodeNotNullMark __attribute__((swift_name("decodeNotNullMark()"))); +- (BOOL)decodeNotNullMark; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (KotlinNothing * _Nullable)decodeNull __attribute__((swift_name("decodeNull()"))); +- (KotlinNothing * _Nullable)decodeNull; /** * @note annotations @@ -280,9 +280,9 @@ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.TimeBased"))) */ - (id _Nullable)decodeNullableSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeNullableSerializableValue(deserializer:)"))); - (id _Nullable)decodeSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeSerializableValue(deserializer:)"))); -- (int16_t)decodeShort __attribute__((swift_name("decodeShort()"))); -- (NSString *)decodeString __attribute__((swift_name("decodeString()"))); -@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +- (int16_t)decodeShort; +- (NSString *)decodeString; +@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule; @end __attribute__((objc_subclassing_restricted)) @@ -291,8 +291,8 @@ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.DateBasedCompanion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) Kotlinx_datetimeDateTimeUnitDateBasedCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); +@property (class, readonly, getter=shared) Kotlinx_datetimeDateTimeUnitDateBasedCompanion *shared; +- (id)serializer; @end __attribute__((objc_subclassing_restricted)) @@ -301,8 +301,8 @@ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.MonthBasedCompanion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) Kotlinx_datetimeDateTimeUnitMonthBasedCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); +@property (class, readonly, getter=shared) Kotlinx_datetimeDateTimeUnitMonthBasedCompanion *shared; +- (id)serializer; @end __attribute__((objc_subclassing_restricted)) @@ -311,8 +311,8 @@ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.DayBasedCompanion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) Kotlinx_datetimeDateTimeUnitDayBasedCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); +@property (class, readonly, getter=shared) Kotlinx_datetimeDateTimeUnitDayBasedCompanion *shared; +- (id)serializer; @end __attribute__((objc_subclassing_restricted)) @@ -321,8 +321,8 @@ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.TimeBasedCompanion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) Kotlinx_datetimeDateTimeUnitTimeBasedCompanion *shared __attribute__((swift_name("shared"))); -- (id)serializer __attribute__((swift_name("serializer()"))); +@property (class, readonly, getter=shared) Kotlinx_datetimeDateTimeUnitTimeBasedCompanion *shared; +- (id)serializer; @end @protocol Kotlinx_serialization_coreCompositeEncoder @@ -351,7 +351,7 @@ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.TimeBasedCompanion"))) * kotlinx.serialization.ExperimentalSerializationApi */ - (BOOL)shouldEncodeElementDefaultDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("shouldEncodeElementDefault(descriptor:index:)"))); -@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule; @end @interface Kotlinx_serialization_coreSerializersModule : Base @@ -391,8 +391,8 @@ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.TimeBasedCompanion"))) * kotlinx.serialization.ExperimentalSerializationApi */ @interface Kotlinx_serialization_coreSerialKind : Base -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); +- (NSUInteger)hash; +- (NSString *)description; @end @protocol Kotlinx_serialization_coreCompositeDecoder @@ -418,12 +418,12 @@ __attribute__((swift_name("Kotlinx_datetimeDateTimeUnit.TimeBasedCompanion"))) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (BOOL)decodeSequentially __attribute__((swift_name("decodeSequentially()"))); +- (BOOL)decodeSequentially; - (id _Nullable)decodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeSerializableElement(descriptor:index:deserializer:previousValue:)"))); - (int16_t)decodeShortElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeShortElement(descriptor:index:)"))); - (NSString *)decodeStringElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeStringElement(descriptor:index:)"))); - (void)endStructureDescriptor:(id)descriptor __attribute__((swift_name("endStructure(descriptor:)"))); -@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule; @end __attribute__((objc_subclassing_restricted)) @@ -470,8 +470,8 @@ __attribute__((objc_subclassing_restricted)) * kotlin.SinceKotlin(version="1.1") */ - (BOOL)isInstanceValue:(id _Nullable)value __attribute__((swift_name("isInstance(value:)"))); -@property (readonly) NSString * _Nullable qualifiedName __attribute__((swift_name("qualifiedName"))); -@property (readonly) NSString * _Nullable simpleName __attribute__((swift_name("simpleName"))); +@property (readonly) NSString * _Nullable qualifiedName; +@property (readonly) NSString * _Nullable simpleName; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/exportedAndNotExportedDependency/!exportedAndNotExportedDependency.h b/native/objcexport-header-generator/testData/dependencies/exportedAndNotExportedDependency/!exportedAndNotExportedDependency.h index 91fd694fe6867..3844868d4899a 100644 --- a/native/objcexport-header-generator/testData/dependencies/exportedAndNotExportedDependency/!exportedAndNotExportedDependency.h +++ b/native/objcexport-header-generator/testData/dependencies/exportedAndNotExportedDependency/!exportedAndNotExportedDependency.h @@ -138,32 +138,32 @@ __attribute__((swift_name("KotlinBoolean"))) __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("MyLibraryA"))) @interface MyAppMyLibraryA : MyAppBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (int32_t)returnInt __attribute__((swift_name("returnInt()"))); -- (MyAppMyLibraryA *)returnMe __attribute__((swift_name("returnMe()"))); +- (int32_t)returnInt; +- (MyAppMyLibraryA *)returnMe; @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("FooKt"))) @interface MyAppFooKt : MyAppBase -+ (MyAppTLBMyLibraryB *)foo __attribute__((swift_name("foo()"))); ++ (MyAppTLBMyLibraryB *)foo; @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("TopLevelCallablesKt"))) @interface MyAppTopLevelCallablesKt : MyAppBase -+ (int32_t)topLevelFunction __attribute__((swift_name("topLevelFunction()"))); -@property (class, readonly) int32_t topLevelProperty __attribute__((swift_name("topLevelProperty"))); ++ (int32_t)topLevelFunction; +@property (class, readonly) int32_t topLevelProperty; @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("TLBMyLibraryB"))) @interface MyAppTLBMyLibraryB : MyAppBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (int32_t)returnInt __attribute__((swift_name("returnInt()"))); -- (MyAppTLBMyLibraryB *)returnMe __attribute__((swift_name("returnMe()"))); +- (int32_t)returnInt; +- (MyAppTLBMyLibraryB *)returnMe; @end @interface MyAppBase (MyAppBaseCopying) diff --git a/native/objcexport-header-generator/testData/dependencies/extensionsLibrary/!extensionsLibrary.h b/native/objcexport-header-generator/testData/dependencies/extensionsLibrary/!extensionsLibrary.h index adec3f70a0f40..ce13a734e4350 100644 --- a/native/objcexport-header-generator/testData/dependencies/extensionsLibrary/!extensionsLibrary.h +++ b/native/objcexport-header-generator/testData/dependencies/extensionsLibrary/!extensionsLibrary.h @@ -22,13 +22,13 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end @interface Foo (Extensions) -- (void)extensionA __attribute__((swift_name("extensionA()"))); -- (void)extensionB __attribute__((swift_name("extensionB()"))); +- (void)extensionA; +- (void)extensionB; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/implementIterator/!implementIterator.h b/native/objcexport-header-generator/testData/dependencies/implementIterator/!implementIterator.h index 41736ff66d1ce..d33ff0203ecb0 100644 --- a/native/objcexport-header-generator/testData/dependencies/implementIterator/!implementIterator.h +++ b/native/objcexport-header-generator/testData/dependencies/implementIterator/!implementIterator.h @@ -22,16 +22,16 @@ NS_ASSUME_NONNULL_BEGIN @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (Int *)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (Int *)next; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/iterator/!iterator.h b/native/objcexport-header-generator/testData/dependencies/iterator/!iterator.h index cca7ddfb9f18f..8db78b4ec9692 100644 --- a/native/objcexport-header-generator/testData/dependencies/iterator/!iterator.h +++ b/native/objcexport-header-generator/testData/dependencies/iterator/!iterator.h @@ -22,13 +22,13 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) id a __attribute__((swift_name("a"))); +@property (class, readonly) id a; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/jsonNamingStrategy/!jsonNamingStrategy.h b/native/objcexport-header-generator/testData/dependencies/jsonNamingStrategy/!jsonNamingStrategy.h index 1031222da05c9..6ea5486b0d87f 100644 --- a/native/objcexport-header-generator/testData/dependencies/jsonNamingStrategy/!jsonNamingStrategy.h +++ b/native/objcexport-header-generator/testData/dependencies/jsonNamingStrategy/!jsonNamingStrategy.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) id _Nullable strategy __attribute__((swift_name("strategy"))); +@property (class, readonly) id _Nullable strategy; @end @@ -74,32 +74,32 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) NSArray> *annotations __attribute__((swift_name("annotations"))); +@property (readonly) NSArray> *annotations; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) int32_t elementsCount __attribute__((swift_name("elementsCount"))); -@property (readonly) BOOL isInline __attribute__((swift_name("isInline"))); +@property (readonly) int32_t elementsCount; +@property (readonly) BOOL isInline; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) BOOL isNullable __attribute__((swift_name("isNullable"))); +@property (readonly) BOOL isNullable; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) Kotlinx_serialization_coreSerialKind *kind __attribute__((swift_name("kind"))); +@property (readonly) Kotlinx_serialization_coreSerialKind *kind; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) NSString *serialName __attribute__((swift_name("serialName"))); +@property (readonly) NSString *serialName; @end @protocol KotlinAnnotation @@ -112,8 +112,8 @@ __attribute__((objc_subclassing_restricted)) * kotlinx.serialization.ExperimentalSerializationApi */ @interface Kotlinx_serialization_coreSerialKind : Base -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); +- (NSUInteger)hash; +- (NSString *)description; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/kotlinxCoroutines/!kotlinxCoroutines.h b/native/objcexport-header-generator/testData/dependencies/kotlinxCoroutines/!kotlinxCoroutines.h index 1858d2c8db18e..88657dbaaaa31 100644 --- a/native/objcexport-header-generator/testData/dependencies/kotlinxCoroutines/!kotlinxCoroutines.h +++ b/native/objcexport-header-generator/testData/dependencies/kotlinxCoroutines/!kotlinxCoroutines.h @@ -37,14 +37,14 @@ NS_ASSUME_NONNULL_BEGIN @protocol KotlinCoroutineContextElement @required -@property (readonly) id key __attribute__((swift_name("key"))); +@property (readonly) id key; @end @protocol Job @required - (id)attachChildChild:(id)child __attribute__((swift_name("attachChild(child:)"))); - (void)cancelCause:(KotlinCancellationException * _Nullable)cause __attribute__((swift_name("cancel(cause:)"))); -- (KotlinCancellationException *)getCancellationException __attribute__((swift_name("getCancellationException()"))); +- (KotlinCancellationException *)getCancellationException; - (id)invokeOnCompletionHandler:(void (^)(KotlinThrowable * _Nullable cause))handler __attribute__((swift_name("invokeOnCompletion(handler:)"))); - (id)invokeOnCompletionOnCancelling:(BOOL)onCancelling invokeImmediately:(BOOL)invokeImmediately handler:(void (^)(KotlinThrowable * _Nullable cause))handler __attribute__((swift_name("invokeOnCompletion(onCancelling:invokeImmediately:handler:)"))); @@ -54,18 +54,18 @@ NS_ASSUME_NONNULL_BEGIN */ - (void)joinWithCompletionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("join(completionHandler:)"))); - (id)plusOther:(id)other __attribute__((swift_name("plus(other:)"))) __attribute__((unavailable("Operator '+' on two Job objects is meaningless. Job is a coroutine context element and `+` is a set-sum operator for coroutine contexts. The job to the right of `+` just replaces the job the left of `+`."))); -- (BOOL)start __attribute__((swift_name("start()"))); -@property (readonly) id children __attribute__((swift_name("children"))); -@property (readonly) BOOL isActive __attribute__((swift_name("isActive"))); -@property (readonly) BOOL isCancelled __attribute__((swift_name("isCancelled"))); -@property (readonly) BOOL isCompleted __attribute__((swift_name("isCompleted"))); -@property (readonly) id onJoin __attribute__((swift_name("onJoin"))); +- (BOOL)start; +@property (readonly) id children; +@property (readonly) BOOL isActive; +@property (readonly) BOOL isCancelled; +@property (readonly) BOOL isCompleted; +@property (readonly) id onJoin; /** * @note annotations * kotlinx.coroutines.ExperimentalCoroutinesApi */ -@property (readonly) id _Nullable parent __attribute__((swift_name("parent"))); +@property (readonly) id _Nullable parent; @end @protocol ChildJob @@ -75,7 +75,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol ParentJob @required -- (KotlinCancellationException *)getChildJobCancellationCause __attribute__((swift_name("getChildJobCancellationCause()"))); +- (KotlinCancellationException *)getChildJobCancellationCause; @end @interface JobSupport : Base @@ -100,11 +100,11 @@ NS_ASSUME_NONNULL_BEGIN /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ -- (NSString *)cancellationExceptionMessage __attribute__((swift_name("cancellationExceptionMessage()"))); +- (NSString *)cancellationExceptionMessage; - (BOOL)childCancelledCause:(KotlinThrowable *)cause __attribute__((swift_name("childCancelled(cause:)"))); -- (KotlinCancellationException *)getCancellationException __attribute__((swift_name("getCancellationException()"))); -- (KotlinCancellationException *)getChildJobCancellationCause __attribute__((swift_name("getChildJobCancellationCause()"))); -- (KotlinThrowable * _Nullable)getCompletionExceptionOrNull __attribute__((swift_name("getCompletionExceptionOrNull()"))); +- (KotlinCancellationException *)getCancellationException; +- (KotlinCancellationException *)getChildJobCancellationCause; +- (KotlinThrowable * _Nullable)getCompletionExceptionOrNull; /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. @@ -137,44 +137,44 @@ NS_ASSUME_NONNULL_BEGIN /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ -- (void)onStart __attribute__((swift_name("onStart()"))); +- (void)onStart; - (void)parentCancelledParentJob:(id)parentJob __attribute__((swift_name("parentCancelled(parentJob:)"))); -- (BOOL)start __attribute__((swift_name("start()"))); +- (BOOL)start; /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ - (KotlinCancellationException *)toCancellationException:(KotlinThrowable *)receiver message:(NSString * _Nullable)message __attribute__((swift_name("toCancellationException(_:message:)"))); -- (NSString *)toDebugString __attribute__((swift_name("toDebugString()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id children __attribute__((swift_name("children"))); +- (NSString *)toDebugString; +- (NSString *)description; +@property (readonly) id children; /** * @note This property has protected visibility in Kotlin source and is intended only for use by subclasses. */ -@property (readonly) KotlinThrowable * _Nullable completionCause __attribute__((swift_name("completionCause"))); +@property (readonly) KotlinThrowable * _Nullable completionCause; /** * @note This property has protected visibility in Kotlin source and is intended only for use by subclasses. */ -@property (readonly) BOOL completionCauseHandled __attribute__((swift_name("completionCauseHandled"))); -@property (readonly) BOOL isActive __attribute__((swift_name("isActive"))); -@property (readonly) BOOL isCancelled __attribute__((swift_name("isCancelled"))); -@property (readonly) BOOL isCompleted __attribute__((swift_name("isCompleted"))); -@property (readonly) BOOL isCompletedExceptionally __attribute__((swift_name("isCompletedExceptionally"))); +@property (readonly) BOOL completionCauseHandled; +@property (readonly) BOOL isActive; +@property (readonly) BOOL isCancelled; +@property (readonly) BOOL isCompleted; +@property (readonly) BOOL isCompletedExceptionally; /** * @note This property has protected visibility in Kotlin source and is intended only for use by subclasses. */ -@property (readonly) BOOL isScopedCoroutine __attribute__((swift_name("isScopedCoroutine"))); -@property (readonly) id key __attribute__((swift_name("key"))); +@property (readonly) BOOL isScopedCoroutine; +@property (readonly) id key; /** * @note This property has protected visibility in Kotlin source and is intended only for use by subclasses. */ -@property (readonly) id onAwaitInternal __attribute__((swift_name("onAwaitInternal"))); -@property (readonly) id onJoin __attribute__((swift_name("onJoin"))); -@property (readonly) id _Nullable parent __attribute__((swift_name("parent"))); +@property (readonly) id onAwaitInternal; +@property (readonly) id onJoin; +@property (readonly) id _Nullable parent; @end @@ -185,12 +185,12 @@ NS_ASSUME_NONNULL_BEGIN @protocol KotlinContinuation @required - (void)resumeWithResult:(id _Nullable)result __attribute__((swift_name("resumeWith(result:)"))); -@property (readonly) id context __attribute__((swift_name("context"))); +@property (readonly) id context; @end @protocol CoroutineScope @required -@property (readonly) id coroutineContext __attribute__((swift_name("coroutineContext"))); +@property (readonly) id coroutineContext; @end @interface AbstractCoroutine<__contravariant T> : JobSupport @@ -205,7 +205,7 @@ NS_ASSUME_NONNULL_BEGIN /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ -- (NSString *)cancellationExceptionMessage __attribute__((swift_name("cancellationExceptionMessage()"))); +- (NSString *)cancellationExceptionMessage; /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. @@ -223,16 +223,16 @@ NS_ASSUME_NONNULL_BEGIN - (void)onCompletionInternalState:(id _Nullable)state __attribute__((swift_name("onCompletionInternal(state:)"))); - (void)resumeWithResult:(id _Nullable)result __attribute__((swift_name("resumeWith(result:)"))); - (void)startStart:(CoroutineStart *)start receiver:(id _Nullable)receiver block:(id)block __attribute__((swift_name("start(start:receiver:block:)"))); -@property (readonly) id context __attribute__((swift_name("context"))); -@property (readonly) id coroutineContext __attribute__((swift_name("coroutineContext"))); -@property (readonly) BOOL isActive __attribute__((swift_name("isActive"))); +@property (readonly) id context; +@property (readonly) id coroutineContext; +@property (readonly) BOOL isActive; @end @protocol CancellableContinuation @required - (BOOL)cancelCause_:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("cancel(cause_:)"))); - (void)completeResumeToken:(id)token __attribute__((swift_name("completeResume(token:)"))); -- (void)doInitCancellability __attribute__((swift_name("doInitCancellability()"))); +- (void)doInitCancellability; - (void)invokeOnCancellationHandler:(void (^)(KotlinThrowable * _Nullable cause))handler __attribute__((swift_name("invokeOnCancellation(handler:)"))); /** @@ -255,20 +255,20 @@ NS_ASSUME_NONNULL_BEGIN - (id _Nullable)tryResumeValue:(id _Nullable)value idempotent:(id _Nullable)idempotent __attribute__((swift_name("tryResume(value:idempotent:)"))); - (id _Nullable)tryResumeValue:(id _Nullable)value idempotent:(id _Nullable)idempotent onCancellation:(void (^ _Nullable)(KotlinThrowable *cause))onCancellation __attribute__((swift_name("tryResume(value:idempotent:onCancellation:)"))); - (id _Nullable)tryResumeWithExceptionException:(KotlinThrowable *)exception __attribute__((swift_name("tryResumeWithException(exception:)"))); -@property (readonly) BOOL isActive __attribute__((swift_name("isActive"))); -@property (readonly) BOOL isCancelled __attribute__((swift_name("isCancelled"))); -@property (readonly) BOOL isCompleted __attribute__((swift_name("isCompleted"))); +@property (readonly) BOOL isActive; +@property (readonly) BOOL isCancelled; +@property (readonly) BOOL isCompleted; @end @protocol DisposableHandle @required -- (void)dispose __attribute__((swift_name("dispose()"))); +- (void)dispose; @end @protocol ChildHandle @required - (BOOL)childCancelledCause:(KotlinThrowable *)cause __attribute__((swift_name("childCancelled(cause:)"))); -@property (readonly) id _Nullable parent __attribute__((swift_name("parent"))); +@property (readonly) id _Nullable parent; @end @@ -278,7 +278,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface KotlinAbstractCoroutineContextElement : Base - (instancetype)initWithKey:(id)key __attribute__((swift_name("init(key:)"))) __attribute__((objc_designated_initializer)); -@property (readonly) id key __attribute__((swift_name("key"))); +@property (readonly) id key; @end @@ -293,10 +293,10 @@ NS_ASSUME_NONNULL_BEGIN @end @interface CoroutineDispatcher : KotlinAbstractCoroutineContextElement -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithKey:(id)key __attribute__((swift_name("init(key:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) CoroutineDispatcherKey *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) CoroutineDispatcherKey *companion; - (void)dispatchContext:(id)context block:(id)block __attribute__((swift_name("dispatch(context:block:)"))); - (void)dispatchYieldContext:(id)context block:(id)block __attribute__((swift_name("dispatchYield(context:block:)"))); - (id)interceptContinuationContinuation:(id)continuation __attribute__((swift_name("interceptContinuation(continuation:)"))); @@ -309,13 +309,13 @@ NS_ASSUME_NONNULL_BEGIN - (CoroutineDispatcher *)limitedParallelismParallelism:(int32_t)parallelism __attribute__((swift_name("limitedParallelism(parallelism:)"))); - (CoroutineDispatcher *)plusOther_:(CoroutineDispatcher *)other __attribute__((swift_name("plus(other_:)"))) __attribute__((unavailable("Operator '+' on two CoroutineDispatcher objects is meaningless. CoroutineDispatcher is a coroutine context element and `+` is a set-sum operator for coroutine contexts. The dispatcher to the right of `+` just replaces the dispatcher to the left."))); - (void)releaseInterceptedContinuationContinuation:(id)continuation __attribute__((swift_name("releaseInterceptedContinuation(continuation:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); +- (NSString *)description; @end @interface CloseableCoroutineDispatcher : CoroutineDispatcher -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)close __attribute__((swift_name("close()"))); +- (void)close; @end @protocol Deferred @@ -331,14 +331,14 @@ NS_ASSUME_NONNULL_BEGIN * @note annotations * kotlinx.coroutines.ExperimentalCoroutinesApi */ -- (id _Nullable)getCompleted __attribute__((swift_name("getCompleted()"))); +- (id _Nullable)getCompleted; /** * @note annotations * kotlinx.coroutines.ExperimentalCoroutinesApi */ -- (KotlinThrowable * _Nullable)getCompletionExceptionOrNull __attribute__((swift_name("getCompletionExceptionOrNull()"))); -@property (readonly) id onAwait __attribute__((swift_name("onAwait"))); +- (KotlinThrowable * _Nullable)getCompletionExceptionOrNull; +@property (readonly) id onAwait; @end @protocol CompletableDeferred @@ -349,12 +349,12 @@ NS_ASSUME_NONNULL_BEGIN @protocol CompletableJob @required -- (BOOL)complete __attribute__((swift_name("complete()"))); +- (BOOL)complete; - (BOOL)completeExceptionallyException:(KotlinThrowable *)exception __attribute__((swift_name("completeExceptionally(exception:)"))); @end @interface KotlinThrowable : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -364,16 +364,16 @@ NS_ASSUME_NONNULL_BEGIN * @note annotations * kotlin.experimental.ExperimentalNativeApi */ -- (KotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); -- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) KotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); -@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); -- (NSError *)asError __attribute__((swift_name("asError()"))); +- (KotlinArray *)getStackTrace; +- (void)printStackTrace; +- (NSString *)description; +@property (readonly) KotlinThrowable * _Nullable cause; +@property (readonly) NSString * _Nullable message; +- (NSError *)asError; @end @interface KotlinException : KotlinThrowable -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -381,7 +381,7 @@ NS_ASSUME_NONNULL_BEGIN @end @interface KotlinRuntimeException : KotlinException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -391,7 +391,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface CompletionHandlerException : KotlinRuntimeException - (instancetype)initWithMessage:(NSString *)message cause:(KotlinThrowable *)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); +- (instancetype)init __attribute__((objc_designated_initializer)) __attribute__((unavailable)); + (instancetype)new __attribute__((unavailable)); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); @@ -404,7 +404,7 @@ __attribute__((objc_subclassing_restricted)) */ @protocol CopyableThrowable @required -- (KotlinThrowable * _Nullable)createCopy __attribute__((swift_name("createCopy()"))); +- (KotlinThrowable * _Nullable)createCopy; @end @protocol KotlinCoroutineContextKey @@ -433,7 +433,7 @@ __attribute__((swift_name("CoroutineDispatcher.Key"))) + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithBaseKey:(id)baseKey safeCast:(id _Nullable (^)(id element))safeCast __attribute__((swift_name("init(baseKey:safeCast:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); + (instancetype)key __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) CoroutineDispatcherKey *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) CoroutineDispatcherKey *shared; @end @protocol CoroutineExceptionHandler @@ -446,19 +446,19 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)key __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) CoroutineExceptionHandlerKey *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) CoroutineExceptionHandlerKey *shared; @end __attribute__((objc_subclassing_restricted)) @interface CoroutineName : KotlinAbstractCoroutineContextElement - (instancetype)initWithName:(NSString *)name __attribute__((swift_name("init(name:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithKey:(id)key __attribute__((swift_name("init(key:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly, getter=companion) CoroutineNameKey *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) CoroutineNameKey *companion; - (CoroutineName *)doCopyName:(NSString *)name __attribute__((swift_name("doCopy(name:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); +- (NSUInteger)hash; +- (NSString *)description; +@property (readonly) NSString *name; @end __attribute__((objc_subclassing_restricted)) @@ -467,7 +467,7 @@ __attribute__((swift_name("CoroutineName.Key"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)key __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) CoroutineNameKey *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) CoroutineNameKey *shared; @end @protocol KotlinComparable @@ -477,13 +477,13 @@ __attribute__((swift_name("CoroutineName.Key"))) @interface KotlinEnum : Base - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) KotlinEnumCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) KotlinEnumCompanion *companion; - (int32_t)compareToOther:(E)other __attribute__((swift_name("compareTo(other:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@property (readonly) int32_t ordinal __attribute__((swift_name("ordinal"))); +- (NSUInteger)hash; +- (NSString *)description; +@property (readonly) NSString *name; +@property (readonly) int32_t ordinal; @end __attribute__((objc_subclassing_restricted)) @@ -491,14 +491,14 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) CoroutineStart *default_ __attribute__((swift_name("default_"))); -@property (class, readonly) CoroutineStart *lazy __attribute__((swift_name("lazy"))); -@property (class, readonly) CoroutineStart *atomic __attribute__((swift_name("atomic"))); -@property (class, readonly) CoroutineStart *undispatched __attribute__((swift_name("undispatched"))); -+ (KotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@property (class, readonly) CoroutineStart *default_; +@property (class, readonly) CoroutineStart *lazy; +@property (class, readonly) CoroutineStart *atomic; +@property (class, readonly) CoroutineStart *undispatched; ++ (KotlinArray *)values; +@property (class, readonly) NSArray *entries; - (void)invokeBlock:(id)block receiver:(id _Nullable)receiver completion:(id)completion __attribute__((swift_name("invoke(block:receiver:completion:)"))); -@property (readonly) BOOL isLazy __attribute__((swift_name("isLazy"))); +@property (readonly) BOOL isLazy; @end @protocol Delay @@ -518,7 +518,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)dispatchers __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) Dispatchers *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) Dispatchers *shared; @property (readonly) CoroutineDispatcher *Default __attribute__((swift_name("Default"))); @property (readonly) MainCoroutineDispatcher *Main __attribute__((swift_name("Main"))); @property (readonly) CoroutineDispatcher *Unconfined __attribute__((swift_name("Unconfined"))); @@ -534,8 +534,8 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)globalScope __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) GlobalScope *shared __attribute__((swift_name("shared"))); -@property (readonly) id coroutineContext __attribute__((swift_name("coroutineContext"))); +@property (class, readonly, getter=shared) GlobalScope *shared; +@property (readonly) id coroutineContext; @end __attribute__((objc_subclassing_restricted)) @@ -543,20 +543,20 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)key __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) JobKey *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) JobKey *shared; @end @interface MainCoroutineDispatcher : CoroutineDispatcher -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (CoroutineDispatcher *)limitedParallelismParallelism:(int32_t)parallelism __attribute__((swift_name("limitedParallelism(parallelism:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); +- (NSString *)description; /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ -- (NSString * _Nullable)toStringInternalImpl __attribute__((swift_name("toStringInternalImpl()"))); -@property (readonly) MainCoroutineDispatcher *immediate __attribute__((swift_name("immediate"))); +- (NSString * _Nullable)toStringInternalImpl; +@property (readonly) MainCoroutineDispatcher *immediate; @end __attribute__((objc_subclassing_restricted)) @@ -565,10 +565,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithKey:(id)key __attribute__((swift_name("init(key:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); + (instancetype)nonCancellable __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) NonCancellable *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) NonCancellable *shared; - (id)attachChildChild:(id)child __attribute__((swift_name("attachChild(child:)"))) __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); - (void)cancelCause:(KotlinCancellationException * _Nullable)cause __attribute__((swift_name("cancel(cause:)"))) __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); -- (KotlinCancellationException *)getCancellationException __attribute__((swift_name("getCancellationException()"))) __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); +- (KotlinCancellationException *)getCancellationException __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); - (id)invokeOnCompletionHandler:(void (^)(KotlinThrowable * _Nullable cause))handler __attribute__((swift_name("invokeOnCompletion(handler:)"))) __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); - (id)invokeOnCompletionOnCancelling:(BOOL)onCancelling invokeImmediately:(BOOL)invokeImmediately handler:(void (^)(KotlinThrowable * _Nullable cause))handler __attribute__((swift_name("invokeOnCompletion(onCancelling:invokeImmediately:handler:)"))) __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); @@ -577,14 +577,14 @@ __attribute__((objc_subclassing_restricted)) * Other uncaught Kotlin exceptions are fatal. */ - (void)joinWithCompletionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("join(completionHandler:)"))) __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); -- (BOOL)start __attribute__((swift_name("start()"))) __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id children __attribute__((swift_name("children"))) __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); -@property (readonly) BOOL isActive __attribute__((swift_name("isActive"))) __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); -@property (readonly) BOOL isCancelled __attribute__((swift_name("isCancelled"))) __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); -@property (readonly) BOOL isCompleted __attribute__((swift_name("isCompleted"))) __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); -@property (readonly) id onJoin __attribute__((swift_name("onJoin"))) __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); -@property (readonly) id _Nullable parent __attribute__((swift_name("parent"))) __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); +- (BOOL)start __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); +- (NSString *)description; +@property (readonly) id children __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); +@property (readonly) BOOL isActive __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); +@property (readonly) BOOL isCancelled __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); +@property (readonly) BOOL isCompleted __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); +@property (readonly) id onJoin __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); +@property (readonly) id _Nullable parent __attribute__((deprecated("NonCancellable can be used only as an argument for 'withContext', direct usages of its API are prohibited"))); @end __attribute__((objc_subclassing_restricted)) @@ -592,20 +592,20 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)nonDisposableHandle __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) NonDisposableHandle *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) NonDisposableHandle *shared; - (BOOL)childCancelledCause:(KotlinThrowable *)cause __attribute__((swift_name("childCancelled(cause:)"))); -- (void)dispose __attribute__((swift_name("dispose()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id _Nullable parent __attribute__((swift_name("parent"))); +- (void)dispose; +- (NSString *)description; +@property (readonly) id _Nullable parent; @end @protocol Runnable @required -- (void)run __attribute__((swift_name("run()"))); +- (void)run; @end @interface KotlinIllegalStateException : KotlinRuntimeException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -618,7 +618,7 @@ __attribute__((objc_subclassing_restricted)) * kotlin.SinceKotlin(version="1.4") */ @interface KotlinCancellationException : KotlinIllegalStateException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -627,12 +627,12 @@ __attribute__((objc_subclassing_restricted)) __attribute__((objc_subclassing_restricted)) @interface TimeoutCancellationException : KotlinCancellationException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); +- (instancetype)init __attribute__((objc_designated_initializer)) __attribute__((unavailable)); + (instancetype)new __attribute__((unavailable)); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); - (instancetype)initWithMessage:(NSString * _Nullable)message cause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -- (TimeoutCancellationException *)createCopy __attribute__((swift_name("createCopy()"))); +- (TimeoutCancellationException *)createCopy; @end @protocol SendChannel @@ -652,8 +652,8 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlinx.coroutines.DelicateCoroutinesApi */ -@property (readonly) BOOL isClosedForSend __attribute__((swift_name("isClosedForSend"))); -@property (readonly) id onSend __attribute__((swift_name("onSend"))); +@property (readonly) BOOL isClosedForSend; +@property (readonly) id onSend; @end @@ -664,7 +664,7 @@ __attribute__((objc_subclassing_restricted)) @protocol BroadcastChannel @required - (void)cancelCause:(KotlinCancellationException * _Nullable)cause __attribute__((swift_name("cancel(cause:)"))); -- (id)openSubscription __attribute__((swift_name("openSubscription()"))); +- (id)openSubscription; @end __attribute__((objc_subclassing_restricted)) @@ -672,18 +672,18 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) BufferOverflow *suspend __attribute__((swift_name("suspend"))); -@property (class, readonly) BufferOverflow *dropOldest __attribute__((swift_name("dropOldest"))); -@property (class, readonly) BufferOverflow *dropLatest __attribute__((swift_name("dropLatest"))); -+ (KotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@property (class, readonly) BufferOverflow *suspend; +@property (class, readonly) BufferOverflow *dropOldest; +@property (class, readonly) BufferOverflow *dropLatest; ++ (KotlinArray *)values; +@property (class, readonly) NSArray *entries; @end @protocol ReceiveChannel @required - (void)cancelCause:(KotlinCancellationException * _Nullable)cause __attribute__((swift_name("cancel(cause:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); -- (id _Nullable)poll __attribute__((swift_name("poll()"))) __attribute__((unavailable("Deprecated in the favour of 'tryReceive'. Please note that the provided replacement does not rethrow channel's close cause as 'poll' did, for the precise replacement please refer to the 'poll' documentation"))); +- (id)iterator; +- (id _Nullable)poll __attribute__((unavailable("Deprecated in the favour of 'tryReceive'. Please note that the provided replacement does not rethrow channel's close cause as 'poll' did, for the precise replacement please refer to the 'poll' documentation"))); /** * @note This method converts instances of CancellationException to errors. @@ -702,22 +702,22 @@ __attribute__((objc_subclassing_restricted)) * Other uncaught Kotlin exceptions are fatal. */ - (void)receiveOrNullWithCompletionHandler:(void (^)(id _Nullable_result, NSError * _Nullable))completionHandler __attribute__((swift_name("receiveOrNull(completionHandler:)"))) __attribute__((unavailable("Deprecated in favor of 'receiveCatching'. Please note that the provided replacement does not rethrow channel's close cause as 'receiveOrNull' did, for the detailed replacement please refer to the 'receiveOrNull' documentation"))); -- (id _Nullable)tryReceive __attribute__((swift_name("tryReceive()"))); +- (id _Nullable)tryReceive; /** * @note annotations * kotlinx.coroutines.DelicateCoroutinesApi */ -@property (readonly) BOOL isClosedForReceive __attribute__((swift_name("isClosedForReceive"))); +@property (readonly) BOOL isClosedForReceive; /** * @note annotations * kotlinx.coroutines.ExperimentalCoroutinesApi */ -@property (readonly) BOOL isEmpty __attribute__((swift_name("isEmpty"))); -@property (readonly) id onReceive __attribute__((swift_name("onReceive"))); -@property (readonly) id onReceiveCatching __attribute__((swift_name("onReceiveCatching"))); -@property (readonly) id onReceiveOrNull __attribute__((swift_name("onReceiveOrNull"))) __attribute__((unavailable("Deprecated in favor of onReceiveCatching extension"))); +@property (readonly) BOOL isEmpty; +@property (readonly) id onReceive; +@property (readonly) id onReceiveCatching; +@property (readonly) id onReceiveOrNull __attribute__((unavailable("Deprecated in favor of onReceiveCatching extension"))); @end @protocol Channel @@ -729,7 +729,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)factory __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ChannelFactory *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) ChannelFactory *shared; @property (readonly) int32_t BUFFERED __attribute__((swift_name("BUFFERED"))); @property (readonly) int32_t CONFLATED __attribute__((swift_name("CONFLATED"))); @property (readonly) NSString *DEFAULT_BUFFER_PROPERTY_NAME __attribute__((swift_name("DEFAULT_BUFFER_PROPERTY_NAME"))); @@ -745,11 +745,11 @@ __attribute__((objc_subclassing_restricted)) * Other uncaught Kotlin exceptions are fatal. */ - (void)hasNextWithCompletionHandler:(void (^)(Boolean * _Nullable, NSError * _Nullable))completionHandler __attribute__((swift_name("hasNext(completionHandler:)"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (id _Nullable)next; @end @interface KotlinNoSuchElementException : KotlinRuntimeException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); @@ -759,14 +759,14 @@ __attribute__((objc_subclassing_restricted)) __attribute__((objc_subclassing_restricted)) @interface ClosedReceiveChannelException : KotlinNoSuchElementException - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); +- (instancetype)init __attribute__((objc_designated_initializer)) __attribute__((unavailable)); + (instancetype)new __attribute__((unavailable)); @end __attribute__((objc_subclassing_restricted)) @interface ClosedSendChannelException : KotlinIllegalStateException - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); +- (instancetype)init __attribute__((objc_designated_initializer)) __attribute__((unavailable)); + (instancetype)new __attribute__((unavailable)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); - (instancetype)initWithMessage:(NSString * _Nullable)message cause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); @@ -779,14 +779,14 @@ __attribute__((objc_subclassing_restricted)) */ __attribute__((objc_subclassing_restricted)) @interface ConflatedBroadcastChannel : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((deprecated("ConflatedBroadcastChannel is deprecated in the favour of SharedFlow and is no longer supported"))); +- (instancetype)init __attribute__((objc_designated_initializer)) __attribute__((deprecated("ConflatedBroadcastChannel is deprecated in the favour of SharedFlow and is no longer supported"))); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithValue:(E _Nullable)value __attribute__((swift_name("init(value:)"))) __attribute__((objc_designated_initializer)) __attribute__((deprecated("ConflatedBroadcastChannel is deprecated in the favour of SharedFlow and is no longer supported"))); - (void)cancelCause:(KotlinCancellationException * _Nullable)cause __attribute__((swift_name("cancel(cause:)"))); - (BOOL)closeCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("close(cause:)"))); - (void)invokeOnCloseHandler:(void (^)(KotlinThrowable * _Nullable cause))handler __attribute__((swift_name("invokeOnClose(handler:)"))); - (BOOL)offerElement:(E _Nullable)element __attribute__((swift_name("offer(element:)"))) __attribute__((unavailable("Deprecated in the favour of 'trySend' method"))); -- (id)openSubscription __attribute__((swift_name("openSubscription()"))); +- (id)openSubscription; /** * @note This method converts instances of CancellationException to errors. @@ -799,15 +799,15 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlinx.coroutines.DelicateCoroutinesApi */ -@property (readonly) BOOL isClosedForSend __attribute__((swift_name("isClosedForSend"))); -@property (readonly) id onSend __attribute__((swift_name("onSend"))); -@property (readonly) E _Nullable value __attribute__((swift_name("value"))); -@property (readonly) E _Nullable valueOrNull __attribute__((swift_name("valueOrNull"))); +@property (readonly) BOOL isClosedForSend; +@property (readonly) id onSend; +@property (readonly) E _Nullable value; +@property (readonly) E _Nullable valueOrNull; @end @protocol ProducerScope @required -@property (readonly) id channel __attribute__((swift_name("channel"))); +@property (readonly) id channel; @end @protocol Flow @@ -826,7 +826,7 @@ __attribute__((objc_subclassing_restricted)) * kotlinx.coroutines.ExperimentalCoroutinesApi */ @interface AbstractFlow : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** @@ -854,7 +854,7 @@ __attribute__((objc_subclassing_restricted)) @protocol SharedFlow @required -@property (readonly) NSArray *replayCache __attribute__((swift_name("replayCache"))); +@property (readonly) NSArray *replayCache; @end @protocol MutableSharedFlow @@ -864,14 +864,14 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlinx.coroutines.ExperimentalCoroutinesApi */ -- (void)resetReplayCache __attribute__((swift_name("resetReplayCache()"))); +- (void)resetReplayCache; - (BOOL)tryEmitValue:(id _Nullable)value __attribute__((swift_name("tryEmit(value:)"))); -@property (readonly) id subscriptionCount __attribute__((swift_name("subscriptionCount"))); +@property (readonly) id subscriptionCount; @end @protocol StateFlow @required -@property (readonly) id _Nullable value __attribute__((swift_name("value"))); +@property (readonly) id _Nullable value; @end @protocol MutableStateFlow @@ -885,11 +885,11 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) SharingCommand *start __attribute__((swift_name("start"))); -@property (class, readonly) SharingCommand *stop __attribute__((swift_name("stop"))); -@property (class, readonly) SharingCommand *stopAndResetReplayCache __attribute__((swift_name("stopAndResetReplayCache"))); -+ (KotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@property (class, readonly) SharingCommand *start; +@property (class, readonly) SharingCommand *stop; +@property (class, readonly) SharingCommand *stopAndResetReplayCache; ++ (KotlinArray *)values; +@property (class, readonly) NSArray *entries; @end @protocol SharingStarted @@ -902,7 +902,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) SharingStartedCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) SharingStartedCompanion *shared; - (id)WhileSubscribedStopTimeoutMillis:(int64_t)stopTimeoutMillis replayExpirationMillis:(int64_t)replayExpirationMillis __attribute__((swift_name("WhileSubscribed(stopTimeoutMillis:replayExpirationMillis:)"))); @property (readonly) id Eagerly __attribute__((swift_name("Eagerly"))); @property (readonly) id Lazily __attribute__((swift_name("Lazily"))); @@ -919,7 +919,7 @@ __attribute__((objc_subclassing_restricted)) /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ -- (NSString * _Nullable)additionalToStringProps __attribute__((swift_name("additionalToStringProps()"))); +- (NSString * _Nullable)additionalToStringProps; /** * @note This method converts instances of CancellationException to errors. @@ -938,13 +938,13 @@ __attribute__((objc_subclassing_restricted)) * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ - (ChannelFlow *)createContext:(id)context capacity:(int32_t)capacity onBufferOverflow:(BufferOverflow *)onBufferOverflow __attribute__((swift_name("create(context:capacity:onBufferOverflow:)"))); -- (id _Nullable)dropChannelOperators __attribute__((swift_name("dropChannelOperators()"))); +- (id _Nullable)dropChannelOperators; - (id)fuseContext:(id)context capacity:(int32_t)capacity onBufferOverflow:(BufferOverflow *)onBufferOverflow __attribute__((swift_name("fuse(context:capacity:onBufferOverflow:)"))); - (id)produceImplScope:(id)scope __attribute__((swift_name("produceImpl(scope:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t capacity __attribute__((swift_name("capacity"))); -@property (readonly) id context __attribute__((swift_name("context"))); -@property (readonly) BufferOverflow *onBufferOverflow __attribute__((swift_name("onBufferOverflow"))); +- (NSString *)description; +@property (readonly) int32_t capacity; +@property (readonly) id context; +@property (readonly) BufferOverflow *onBufferOverflow; @end __attribute__((objc_subclassing_restricted)) @@ -959,24 +959,24 @@ __attribute__((objc_subclassing_restricted)) @end @interface OpDescriptor : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (id _Nullable)performAffected:(id _Nullable)affected __attribute__((swift_name("perform(affected:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) AtomicOp * _Nullable atomicOp __attribute__((swift_name("atomicOp"))); +- (NSString *)description; +@property (readonly) AtomicOp * _Nullable atomicOp; @end @interface AtomicOp<__contravariant T> : OpDescriptor -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (void)completeAffected:(T _Nullable)affected failure:(id _Nullable)failure __attribute__((swift_name("complete(affected:failure:)"))); - (id _Nullable)performAffected:(id _Nullable)affected __attribute__((swift_name("perform(affected:)"))); - (id _Nullable)prepareAffected:(T _Nullable)affected __attribute__((swift_name("prepare(affected:)"))); -@property (readonly) AtomicOp *atomicOp __attribute__((swift_name("atomicOp"))); +@property (readonly) AtomicOp *atomicOp; @end @interface LockFreeLinkedListNode : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (void)addLastNode:(LockFreeLinkedListNode *)node __attribute__((swift_name("addLast(node:)"))); - (BOOL)addLastIfNode:(LockFreeLinkedListNode *)node condition:(Boolean *(^)(void))condition __attribute__((swift_name("addLastIf(node:condition:)"))); @@ -985,67 +985,67 @@ __attribute__((objc_subclassing_restricted)) /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ -- (LockFreeLinkedListNode * _Nullable)nextIfRemoved __attribute__((swift_name("nextIfRemoved()"))); -- (BOOL)remove __attribute__((swift_name("remove()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) BOOL isRemoved __attribute__((swift_name("isRemoved"))); -@property (readonly, getter=next_) id next __attribute__((swift_name("next"))); -@property (readonly) LockFreeLinkedListNode *nextNode __attribute__((swift_name("nextNode"))); -@property (readonly) LockFreeLinkedListNode *prevNode __attribute__((swift_name("prevNode"))); +- (LockFreeLinkedListNode * _Nullable)nextIfRemoved; +- (BOOL)remove; +- (NSString *)description; +@property (readonly) BOOL isRemoved; +@property (readonly, getter=next_) id next; +@property (readonly) LockFreeLinkedListNode *nextNode; +@property (readonly) LockFreeLinkedListNode *prevNode; @end @interface LockFreeLinkedListHead : LockFreeLinkedListNode -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (void)forEachBlock:(void (^)(LockFreeLinkedListNode *))block __attribute__((swift_name("forEach(block:)"))); /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ -- (LockFreeLinkedListNode * _Nullable)nextIfRemoved __attribute__((swift_name("nextIfRemoved()"))); -- (BOOL)remove __attribute__((swift_name("remove()"))); -@property (readonly) BOOL isEmpty __attribute__((swift_name("isEmpty"))); -@property (readonly) BOOL isRemoved __attribute__((swift_name("isRemoved"))); +- (LockFreeLinkedListNode * _Nullable)nextIfRemoved; +- (BOOL)remove; +@property (readonly) BOOL isEmpty; +@property (readonly) BOOL isRemoved; @end @protocol MainDispatcherFactory @required - (MainCoroutineDispatcher *)createDispatcherAllFactories:(NSArray> *)allFactories __attribute__((swift_name("createDispatcher(allFactories:)"))); -- (NSString * _Nullable)hintOnError __attribute__((swift_name("hintOnError()"))); -@property (readonly) int32_t loadPriority __attribute__((swift_name("loadPriority"))); +- (NSString * _Nullable)hintOnError; +@property (readonly) int32_t loadPriority; @end @interface AtomicfuSynchronizedObject : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)lock __attribute__((swift_name("lock()"))); -- (BOOL)tryLock __attribute__((swift_name("tryLock()"))); -- (void)unlock __attribute__((swift_name("unlock()"))); +- (void)lock; +- (BOOL)tryLock; +- (void)unlock; /** * @note This property has protected visibility in Kotlin source and is intended only for use by subclasses. */ -@property (readonly, getter=lock_) KotlinAtomicReference *lock __attribute__((swift_name("lock"))); +@property (readonly, getter=lock_) KotlinAtomicReference *lock; @end @interface ThreadSafeHeap : AtomicfuSynchronizedObject -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (void)addLastNode:(T)node __attribute__((swift_name("addLast(node:)"))); - (BOOL)addLastIfNode:(T)node cond:(Boolean *(^)(T _Nullable))cond __attribute__((swift_name("addLastIf(node:cond:)"))); - (T _Nullable)findPredicate:(Boolean *(^)(T value))predicate __attribute__((swift_name("find(predicate:)"))); -- (T _Nullable)peek __attribute__((swift_name("peek()"))); +- (T _Nullable)peek; - (BOOL)removeNode:(T)node __attribute__((swift_name("remove(node:)"))); - (T _Nullable)removeFirstIfPredicate:(Boolean *(^)(T))predicate __attribute__((swift_name("removeFirstIf(predicate:)"))); -- (T _Nullable)removeFirstOrNull __attribute__((swift_name("removeFirstOrNull()"))); -@property (readonly) BOOL isEmpty __attribute__((swift_name("isEmpty"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +- (T _Nullable)removeFirstOrNull; +@property (readonly) BOOL isEmpty; +@property (readonly) int32_t size; @end @protocol ThreadSafeHeapNode @required -@property ThreadSafeHeap * _Nullable heap __attribute__((swift_name("heap"))); -@property int32_t index __attribute__((swift_name("index"))); +@property ThreadSafeHeap * _Nullable heap; +@property int32_t index; @end @protocol SelectBuilder @@ -1064,10 +1064,10 @@ __attribute__((objc_subclassing_restricted)) @protocol SelectClause @required -@property (readonly) id clauseObject __attribute__((swift_name("clauseObject"))); -@property (readonly) KotlinUnit *(^(^ _Nullable onCancellationConstructor)(id select, id _Nullable param, id _Nullable internalResult))(KotlinThrowable *) __attribute__((swift_name("onCancellationConstructor"))); -@property (readonly) id _Nullable (^processResFunc)(id clauseObject, id _Nullable param, id _Nullable clauseResult) __attribute__((swift_name("processResFunc"))); -@property (readonly) void (^regFunc)(id clauseObject, id select, id _Nullable param) __attribute__((swift_name("regFunc"))); +@property (readonly) id clauseObject; +@property (readonly) KotlinUnit *(^(^ _Nullable onCancellationConstructor)(id select, id _Nullable param, id _Nullable internalResult))(KotlinThrowable *); +@property (readonly) id _Nullable (^processResFunc)(id clauseObject, id _Nullable param, id _Nullable clauseResult); +@property (readonly) void (^regFunc)(id clauseObject, id select, id _Nullable param); @end @protocol SelectClause0 @@ -1087,7 +1087,7 @@ __attribute__((objc_subclassing_restricted)) - (void)disposeOnCompletionDisposableHandle:(id)disposableHandle __attribute__((swift_name("disposeOnCompletion(disposableHandle:)"))); - (void)selectInRegistrationPhaseInternalResult:(id _Nullable)internalResult __attribute__((swift_name("selectInRegistrationPhase(internalResult:)"))); - (BOOL)trySelectClauseObject:(id)clauseObject result:(id _Nullable)result __attribute__((swift_name("trySelect(clauseObject:result:)"))); -@property (readonly) id context __attribute__((swift_name("context"))); +@property (readonly) id context; @end @protocol Mutex @@ -1101,8 +1101,8 @@ __attribute__((objc_subclassing_restricted)) - (void)lockOwner:(id _Nullable)owner completionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("lock(owner:completionHandler:)"))); - (BOOL)tryLockOwner:(id _Nullable)owner __attribute__((swift_name("tryLock(owner:)"))); - (void)unlockOwner:(id _Nullable)owner __attribute__((swift_name("unlock(owner:)"))); -@property (readonly) BOOL isLocked __attribute__((swift_name("isLocked"))); -@property (readonly) id onLock __attribute__((swift_name("onLock"))) __attribute__((deprecated("Mutex.onLock deprecated without replacement. For additional details please refer to #2794"))); +@property (readonly) BOOL isLocked; +@property (readonly) id onLock __attribute__((deprecated("Mutex.onLock deprecated without replacement. For additional details please refer to #2794"))); @end @protocol Semaphore @@ -1114,8 +1114,8 @@ __attribute__((objc_subclassing_restricted)) */ - (void)acquireWithCompletionHandler:(void (^)(NSError * _Nullable))completionHandler __attribute__((swift_name("acquire(completionHandler:)"))); - (void)release_ __attribute__((swift_name("release()"))); -- (BOOL)tryAcquire __attribute__((swift_name("tryAcquire()"))); -@property (readonly) int32_t availablePermits __attribute__((swift_name("availablePermits"))); +- (BOOL)tryAcquire; +@property (readonly) int32_t availablePermits; @end __attribute__((objc_subclassing_restricted)) @@ -1124,9 +1124,9 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end __attribute__((objc_subclassing_restricted)) @@ -1136,9 +1136,9 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (int32_t)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (KotlinIntIterator *)iterator __attribute__((swift_name("iterator()"))); +- (KotlinIntIterator *)iterator; - (void)setIndex:(int32_t)index value:(int32_t)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end __attribute__((objc_subclassing_restricted)) @@ -1148,34 +1148,34 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (int64_t)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (KotlinLongIterator *)iterator __attribute__((swift_name("iterator()"))); +- (KotlinLongIterator *)iterator; - (void)setIndex:(int32_t)index value:(int64_t)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinIterable @required -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; @end @interface KotlinIntProgression : Base -@property (class, readonly, getter=companion) KotlinIntProgressionCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) KotlinIntProgressionCompanion *companion; - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (BOOL)isEmpty_ __attribute__((swift_name("isEmpty()"))); -- (KotlinIntIterator *)iterator __attribute__((swift_name("iterator()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t first __attribute__((swift_name("first"))); -@property (readonly) int32_t last __attribute__((swift_name("last"))); -@property (readonly) int32_t step __attribute__((swift_name("step"))); +- (NSUInteger)hash; +- (BOOL)isEmpty_; +- (KotlinIntIterator *)iterator; +- (NSString *)description; +@property (readonly) int32_t first; +@property (readonly) int32_t last; +@property (readonly) int32_t step; @end @protocol KotlinClosedRange @required - (BOOL)containsValue:(id)value __attribute__((swift_name("contains(value:)"))); -- (BOOL)isEmpty_ __attribute__((swift_name("isEmpty()"))); -@property (readonly) id endInclusive __attribute__((swift_name("endInclusive"))); -@property (readonly, getter=start_) id start __attribute__((swift_name("start"))); +- (BOOL)isEmpty_; +@property (readonly) id endInclusive; +@property (readonly, getter=start_) id start; @end @@ -1186,61 +1186,61 @@ __attribute__((objc_subclassing_restricted)) @protocol KotlinOpenEndRange @required - (BOOL)containsValue_:(id)value __attribute__((swift_name("contains(value_:)"))); -- (BOOL)isEmpty_ __attribute__((swift_name("isEmpty()"))); -@property (readonly) id endExclusive __attribute__((swift_name("endExclusive"))); -@property (readonly, getter=start_) id start __attribute__((swift_name("start"))); +- (BOOL)isEmpty_; +@property (readonly) id endExclusive; +@property (readonly, getter=start_) id start; @end __attribute__((objc_subclassing_restricted)) @interface KotlinIntRange : KotlinIntProgression - (instancetype)initWithStart:(int32_t)start endInclusive:(int32_t)endInclusive __attribute__((swift_name("init(start:endInclusive:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) KotlinIntRangeCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) KotlinIntRangeCompanion *companion; - (BOOL)containsValue:(Int *)value __attribute__((swift_name("contains(value:)"))); - (BOOL)containsValue_:(Int *)value __attribute__((swift_name("contains(value_:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (BOOL)isEmpty_ __attribute__((swift_name("isEmpty()"))); -- (NSString *)description __attribute__((swift_name("description()"))); +- (NSUInteger)hash; +- (BOOL)isEmpty_; +- (NSString *)description; /** * @note annotations * kotlin.SinceKotlin(version="1.9") */ -@property (readonly) Int *endExclusive __attribute__((swift_name("endExclusive"))) __attribute__((deprecated("Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw."))); -@property (readonly) Int *endInclusive __attribute__((swift_name("endInclusive"))); -@property (readonly, getter=start_) Int *start __attribute__((swift_name("start"))); +@property (readonly) Int *endExclusive __attribute__((deprecated("Can throw an exception when it's impossible to represent the value with Int type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw."))); +@property (readonly) Int *endInclusive; +@property (readonly, getter=start_) Int *start; @end @interface KotlinLongProgression : Base -@property (class, readonly, getter=companion) KotlinLongProgressionCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) KotlinLongProgressionCompanion *companion; - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (BOOL)isEmpty_ __attribute__((swift_name("isEmpty()"))); -- (KotlinLongIterator *)iterator __attribute__((swift_name("iterator()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int64_t first __attribute__((swift_name("first"))); -@property (readonly) int64_t last __attribute__((swift_name("last"))); -@property (readonly) int64_t step __attribute__((swift_name("step"))); +- (NSUInteger)hash; +- (BOOL)isEmpty_; +- (KotlinLongIterator *)iterator; +- (NSString *)description; +@property (readonly) int64_t first; +@property (readonly) int64_t last; +@property (readonly) int64_t step; @end __attribute__((objc_subclassing_restricted)) @interface KotlinLongRange : KotlinLongProgression - (instancetype)initWithStart:(int64_t)start endInclusive:(int64_t)endInclusive __attribute__((swift_name("init(start:endInclusive:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) KotlinLongRangeCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) KotlinLongRangeCompanion *companion; - (BOOL)containsValue:(Long *)value __attribute__((swift_name("contains(value:)"))); - (BOOL)containsValue_:(Long *)value __attribute__((swift_name("contains(value_:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (BOOL)isEmpty_ __attribute__((swift_name("isEmpty()"))); -- (NSString *)description __attribute__((swift_name("description()"))); +- (NSUInteger)hash; +- (BOOL)isEmpty_; +- (NSString *)description; /** * @note annotations * kotlin.SinceKotlin(version="1.9") */ -@property (readonly) Long *endExclusive __attribute__((swift_name("endExclusive"))) __attribute__((deprecated("Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw."))); -@property (readonly) Long *endInclusive __attribute__((swift_name("endInclusive"))); -@property (readonly, getter=start_) Long *start __attribute__((swift_name("start"))); +@property (readonly) Long *endExclusive __attribute__((deprecated("Can throw an exception when it's impossible to represent the value with Long type, for example, when the range includes MAX_VALUE. It's recommended to use 'endInclusive' property that doesn't throw."))); +@property (readonly) Long *endInclusive; +@property (readonly, getter=start_) Long *start; @end __attribute__((objc_subclassing_restricted)) @@ -1318,7 +1318,7 @@ __attribute__((objc_subclassing_restricted)) + (id)asFlow____:(id)receiver __attribute__((swift_name("asFlow(_____:)"))); + (id)callbackFlowBlock:(id)block __attribute__((swift_name("callbackFlow(block:)"))); + (id)channelFlowBlock:(id)block __attribute__((swift_name("channelFlow(block:)"))); -+ (id)emptyFlow __attribute__((swift_name("emptyFlow()"))); ++ (id)emptyFlow; + (id)flowBlock:(id)block __attribute__((swift_name("flow(block:)"))); + (id)flowOfValue:(id _Nullable)value __attribute__((swift_name("flowOf(value:)"))); + (id)flowOfElements:(KotlinArray *)elements __attribute__((swift_name("flowOf(elements:)"))); @@ -2089,7 +2089,7 @@ __attribute__((objc_subclassing_restricted)) @protocol KotlinSequence @required -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; @end @protocol KotlinFunction @@ -2111,18 +2111,18 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinEnumCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinEnumCompanion *shared; @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("AtomicfuSynchronizedObject.LockState"))) @interface AtomicfuSynchronizedObjectLockState : Base - (instancetype)initWithStatus:(AtomicfuSynchronizedObjectStatus *)status nestedLocks:(int32_t)nestedLocks waiters:(int32_t)waiters ownerThreadId:(void * _Nullable)ownerThreadId mutex:(void * _Nullable)mutex __attribute__((swift_name("init(status:nestedLocks:waiters:ownerThreadId:mutex:)"))) __attribute__((objc_designated_initializer)); -@property (readonly) void * _Nullable mutex __attribute__((swift_name("mutex"))); -@property (readonly) int32_t nestedLocks __attribute__((swift_name("nestedLocks"))); -@property (readonly) void * _Nullable ownerThreadId __attribute__((swift_name("ownerThreadId"))); -@property (readonly) AtomicfuSynchronizedObjectStatus *status __attribute__((swift_name("status"))); -@property (readonly) int32_t waiters __attribute__((swift_name("waiters"))); +@property (readonly) void * _Nullable mutex; +@property (readonly) int32_t nestedLocks; +@property (readonly) void * _Nullable ownerThreadId; +@property (readonly) AtomicfuSynchronizedObjectStatus *status; +@property (readonly) int32_t waiters; @end @@ -2136,8 +2136,8 @@ __attribute__((objc_subclassing_restricted)) - (T _Nullable)compareAndExchangeExpected:(T _Nullable)expected newValue:(T _Nullable)newValue __attribute__((swift_name("compareAndExchange(expected:newValue:)"))); - (BOOL)compareAndSetExpected:(T _Nullable)expected newValue:(T _Nullable)newValue __attribute__((swift_name("compareAndSet(expected:newValue:)"))); - (T _Nullable)getAndSetNewValue:(T _Nullable)newValue __attribute__((swift_name("getAndSet(newValue:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property T _Nullable value __attribute__((swift_name("value"))); +- (NSString *)description; +@property T _Nullable value; @end @protocol KotlinSuspendFunction0 @@ -2155,28 +2155,28 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)unit __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinUnit *shared __attribute__((swift_name("shared"))); -- (NSString *)description __attribute__((swift_name("description()"))); +@property (class, readonly, getter=shared) KotlinUnit *shared; +- (NSString *)description; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end @interface KotlinIntIterator : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (Int *)next __attribute__((swift_name("next()"))); -- (int32_t)nextInt __attribute__((swift_name("nextInt()"))); +- (Int *)next; +- (int32_t)nextInt; @end @interface KotlinLongIterator : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (Long *)next __attribute__((swift_name("next()"))); -- (int64_t)nextLong __attribute__((swift_name("nextLong()"))); +- (Long *)next; +- (int64_t)nextLong; @end __attribute__((objc_subclassing_restricted)) @@ -2185,7 +2185,7 @@ __attribute__((swift_name("KotlinIntProgression.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinIntProgressionCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinIntProgressionCompanion *shared; - (KotlinIntProgression *)fromClosedRangeRangeStart:(int32_t)rangeStart rangeEnd:(int32_t)rangeEnd step:(int32_t)step __attribute__((swift_name("fromClosedRange(rangeStart:rangeEnd:step:)"))); @end @@ -2195,7 +2195,7 @@ __attribute__((swift_name("KotlinIntRange.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinIntRangeCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinIntRangeCompanion *shared; @property (readonly) KotlinIntRange *EMPTY __attribute__((swift_name("EMPTY"))); @end @@ -2205,7 +2205,7 @@ __attribute__((swift_name("KotlinLongProgression.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinLongProgressionCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinLongProgressionCompanion *shared; - (KotlinLongProgression *)fromClosedRangeRangeStart:(int64_t)rangeStart rangeEnd:(int64_t)rangeEnd step:(int64_t)step __attribute__((swift_name("fromClosedRange(rangeStart:rangeEnd:step:)"))); @end @@ -2215,7 +2215,7 @@ __attribute__((swift_name("KotlinLongRange.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinLongRangeCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinLongRangeCompanion *shared; @property (readonly) KotlinLongRange *EMPTY __attribute__((swift_name("EMPTY"))); @end @@ -2288,8 +2288,8 @@ __attribute__((objc_subclassing_restricted)) * kotlin.SinceKotlin(version="1.1") */ - (BOOL)isInstanceValue:(id _Nullable)value __attribute__((swift_name("isInstance(value:)"))); -@property (readonly) NSString * _Nullable qualifiedName __attribute__((swift_name("qualifiedName"))); -@property (readonly) NSString * _Nullable simpleName __attribute__((swift_name("simpleName"))); +@property (readonly) NSString * _Nullable qualifiedName; +@property (readonly) NSString * _Nullable simpleName; @end @protocol KotlinSuspendFunction6 @@ -2308,11 +2308,11 @@ __attribute__((swift_name("AtomicfuSynchronizedObject.Status"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) AtomicfuSynchronizedObjectStatus *unlocked __attribute__((swift_name("unlocked"))); -@property (class, readonly) AtomicfuSynchronizedObjectStatus *thin __attribute__((swift_name("thin"))); -@property (class, readonly) AtomicfuSynchronizedObjectStatus *fat __attribute__((swift_name("fat"))); -+ (KotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@property (class, readonly) AtomicfuSynchronizedObjectStatus *unlocked; +@property (class, readonly) AtomicfuSynchronizedObjectStatus *thin; +@property (class, readonly) AtomicfuSynchronizedObjectStatus *fat; ++ (KotlinArray *)values; +@property (class, readonly) NSArray *entries; @end @interface CoroutineDispatcher (Extensions) @@ -2329,23 +2329,23 @@ __attribute__((swift_name("AtomicfuSynchronizedObject.Status"))) @end @interface KotlinArray (Extensions) -- (id)asFlow __attribute__((swift_name("asFlow()"))); +- (id)asFlow; @end @interface KotlinIntArray (Extensions) -- (id)asFlow __attribute__((swift_name("asFlow()"))); +- (id)asFlow; @end @interface KotlinIntRange (Extensions) -- (id)asFlow __attribute__((swift_name("asFlow()"))); +- (id)asFlow; @end @interface KotlinLongArray (Extensions) -- (id)asFlow __attribute__((swift_name("asFlow()"))); +- (id)asFlow; @end @interface KotlinLongRange (Extensions) -- (id)asFlow __attribute__((swift_name("asFlow()"))); +- (id)asFlow; @end @interface SharingStartedCompanion (Extensions) diff --git a/native/objcexport-header-generator/testData/dependencies/kotlinxDatetime/!kotlinxDatetime.h b/native/objcexport-header-generator/testData/dependencies/kotlinxDatetime/!kotlinxDatetime.h index 0fcb28e3cfc2d..b22b494a8c6ee 100644 --- a/native/objcexport-header-generator/testData/dependencies/kotlinxDatetime/!kotlinxDatetime.h +++ b/native/objcexport-header-generator/testData/dependencies/kotlinxDatetime/!kotlinxDatetime.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol Clock @required -- (Instant *)now __attribute__((swift_name("now()"))); +- (Instant *)now; @end __attribute__((objc_subclassing_restricted)) @@ -32,7 +32,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ClockCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) ClockCompanion *shared; @end __attribute__((objc_subclassing_restricted)) @@ -40,33 +40,33 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)system __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) ClockSystem *shared __attribute__((swift_name("shared"))); -- (Instant *)now __attribute__((swift_name("now()"))); +@property (class, readonly, getter=shared) ClockSystem *shared; +- (Instant *)now; @end @interface DateTimePeriod : Base -@property (class, readonly, getter=companion) DateTimePeriodCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) DateTimePeriodCompanion *companion; - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t days __attribute__((swift_name("days"))); -@property (readonly) int32_t hours __attribute__((swift_name("hours"))); -@property (readonly) int32_t minutes __attribute__((swift_name("minutes"))); -@property (readonly) int32_t months __attribute__((swift_name("months"))); -@property (readonly) int32_t nanoseconds __attribute__((swift_name("nanoseconds"))); -@property (readonly) int32_t seconds __attribute__((swift_name("seconds"))); -@property (readonly) int32_t years __attribute__((swift_name("years"))); +- (NSUInteger)hash; +- (NSString *)description; +@property (readonly) int32_t days; +@property (readonly) int32_t hours; +@property (readonly) int32_t minutes; +@property (readonly) int32_t months; +@property (readonly) int32_t nanoseconds; +@property (readonly) int32_t seconds; +@property (readonly) int32_t years; @end __attribute__((objc_subclassing_restricted)) @interface DatePeriod : DateTimePeriod - (instancetype)initWithYears:(int32_t)years months:(int32_t)months days:(int32_t)days __attribute__((swift_name("init(years:months:days:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) DatePeriodCompanion *companion __attribute__((swift_name("companion"))); -@property (readonly) int32_t days __attribute__((swift_name("days"))); -@property (readonly) int32_t hours __attribute__((swift_name("hours"))); -@property (readonly) int32_t minutes __attribute__((swift_name("minutes"))); -@property (readonly) int32_t nanoseconds __attribute__((swift_name("nanoseconds"))); -@property (readonly) int32_t seconds __attribute__((swift_name("seconds"))); +@property (class, readonly, getter=companion) DatePeriodCompanion *companion; +@property (readonly) int32_t days; +@property (readonly) int32_t hours; +@property (readonly) int32_t minutes; +@property (readonly) int32_t nanoseconds; +@property (readonly) int32_t seconds; @end __attribute__((objc_subclassing_restricted)) @@ -75,13 +75,13 @@ __attribute__((swift_name("DatePeriod.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DatePeriodCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) DatePeriodCompanion *shared; - (DatePeriod *)parseText:(NSString *)text __attribute__((swift_name("parse(text:)"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +- (KSerializer *)serializer; @end @interface KotlinThrowable : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -91,16 +91,16 @@ __attribute__((swift_name("DatePeriod.Companion"))) * @note annotations * kotlin.experimental.ExperimentalNativeApi */ -- (KotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); -- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) KotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); -@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); -- (NSError *)asError __attribute__((swift_name("asError()"))); +- (KotlinArray *)getStackTrace; +- (void)printStackTrace; +- (NSString *)description; +@property (readonly) KotlinThrowable * _Nullable cause; +@property (readonly) NSString * _Nullable message; +- (NSError *)asError; @end @interface KotlinException : KotlinThrowable -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -108,7 +108,7 @@ __attribute__((swift_name("DatePeriod.Companion"))) @end @interface KotlinRuntimeException : KotlinException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -117,7 +117,7 @@ __attribute__((swift_name("DatePeriod.Companion"))) __attribute__((objc_subclassing_restricted)) @interface DateTimeArithmeticException : KotlinRuntimeException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString *)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable *)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -130,13 +130,13 @@ __attribute__((swift_name("DateTimePeriod.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DateTimePeriodCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) DateTimePeriodCompanion *shared; - (DateTimePeriod *)parseText:(NSString *)text __attribute__((swift_name("parse(text:)"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +- (KSerializer *)serializer; @end @interface DateTimeUnit : Base -@property (class, readonly, getter=companion) DateTimeUnitCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) DateTimeUnitCompanion *companion; /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. @@ -156,8 +156,8 @@ __attribute__((swift_name("DateTimeUnit.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DateTimeUnitCompanion *shared __attribute__((swift_name("shared"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +@property (class, readonly, getter=shared) DateTimeUnitCompanion *shared; +- (KSerializer *)serializer; @property (readonly) DateTimeUnitMonthBased *CENTURY __attribute__((swift_name("CENTURY"))); @property (readonly) DateTimeUnitDayBased *DAY __attribute__((swift_name("DAY"))); @property (readonly) DateTimeUnitTimeBased *HOUR __attribute__((swift_name("HOUR"))); @@ -174,7 +174,7 @@ __attribute__((swift_name("DateTimeUnit.Companion"))) __attribute__((swift_name("DateTimeUnit.DateBased"))) @interface DateTimeUnitDateBased : DateTimeUnit -@property (class, readonly, getter=companion) DateTimeUnitDateBasedCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) DateTimeUnitDateBasedCompanion *companion; @end __attribute__((objc_subclassing_restricted)) @@ -183,20 +183,20 @@ __attribute__((swift_name("DateTimeUnit.DateBasedCompanion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DateTimeUnitDateBasedCompanion *shared __attribute__((swift_name("shared"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +@property (class, readonly, getter=shared) DateTimeUnitDateBasedCompanion *shared; +- (KSerializer *)serializer; @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("DateTimeUnit.DayBased"))) @interface DateTimeUnitDayBased : DateTimeUnitDateBased - (instancetype)initWithDays:(int32_t)days __attribute__((swift_name("init(days:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) DateTimeUnitDayBasedCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) DateTimeUnitDayBasedCompanion *companion; - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSUInteger)hash; - (DateTimeUnitDayBased *)timesScalar:(int32_t)scalar __attribute__((swift_name("times(scalar:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t days __attribute__((swift_name("days"))); +- (NSString *)description; +@property (readonly) int32_t days; @end __attribute__((objc_subclassing_restricted)) @@ -205,20 +205,20 @@ __attribute__((swift_name("DateTimeUnit.DayBasedCompanion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DateTimeUnitDayBasedCompanion *shared __attribute__((swift_name("shared"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +@property (class, readonly, getter=shared) DateTimeUnitDayBasedCompanion *shared; +- (KSerializer *)serializer; @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("DateTimeUnit.MonthBased"))) @interface DateTimeUnitMonthBased : DateTimeUnitDateBased - (instancetype)initWithMonths:(int32_t)months __attribute__((swift_name("init(months:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) DateTimeUnitMonthBasedCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) DateTimeUnitMonthBasedCompanion *companion; - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSUInteger)hash; - (DateTimeUnitMonthBased *)timesScalar:(int32_t)scalar __attribute__((swift_name("times(scalar:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t months __attribute__((swift_name("months"))); +- (NSString *)description; +@property (readonly) int32_t months; @end __attribute__((objc_subclassing_restricted)) @@ -227,21 +227,21 @@ __attribute__((swift_name("DateTimeUnit.MonthBasedCompanion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DateTimeUnitMonthBasedCompanion *shared __attribute__((swift_name("shared"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +@property (class, readonly, getter=shared) DateTimeUnitMonthBasedCompanion *shared; +- (KSerializer *)serializer; @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("DateTimeUnit.TimeBased"))) @interface DateTimeUnitTimeBased : DateTimeUnit - (instancetype)initWithNanoseconds:(int64_t)nanoseconds __attribute__((swift_name("init(nanoseconds:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) DateTimeUnitTimeBasedCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) DateTimeUnitTimeBasedCompanion *companion; - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSUInteger)hash; - (DateTimeUnitTimeBased *)timesScalar:(int32_t)scalar __attribute__((swift_name("times(scalar:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int64_t duration __attribute__((swift_name("duration"))); -@property (readonly) int64_t nanoseconds __attribute__((swift_name("nanoseconds"))); +- (NSString *)description; +@property (readonly) int64_t duration; +@property (readonly) int64_t nanoseconds; @end __attribute__((objc_subclassing_restricted)) @@ -250,8 +250,8 @@ __attribute__((swift_name("DateTimeUnit.TimeBasedCompanion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DateTimeUnitTimeBasedCompanion *shared __attribute__((swift_name("shared"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +@property (class, readonly, getter=shared) DateTimeUnitTimeBasedCompanion *shared; +- (KSerializer *)serializer; @end @protocol KotlinComparable @@ -261,13 +261,13 @@ __attribute__((swift_name("DateTimeUnit.TimeBasedCompanion"))) @interface KotlinEnum : Base - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) KotlinEnumCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) KotlinEnumCompanion *companion; - (int32_t)compareToOther:(E)other __attribute__((swift_name("compareTo(other:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@property (readonly) int32_t ordinal __attribute__((swift_name("ordinal"))); +- (NSUInteger)hash; +- (NSString *)description; +@property (readonly) NSString *name; +@property (readonly) int32_t ordinal; @end __attribute__((objc_subclassing_restricted)) @@ -275,34 +275,34 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) DayOfWeek *monday __attribute__((swift_name("monday"))); -@property (class, readonly) DayOfWeek *tuesday __attribute__((swift_name("tuesday"))); -@property (class, readonly) DayOfWeek *wednesday __attribute__((swift_name("wednesday"))); -@property (class, readonly) DayOfWeek *thursday __attribute__((swift_name("thursday"))); -@property (class, readonly) DayOfWeek *friday __attribute__((swift_name("friday"))); -@property (class, readonly) DayOfWeek *saturday __attribute__((swift_name("saturday"))); -@property (class, readonly) DayOfWeek *sunday __attribute__((swift_name("sunday"))); -+ (KotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@property (class, readonly) DayOfWeek *monday; +@property (class, readonly) DayOfWeek *tuesday; +@property (class, readonly) DayOfWeek *wednesday; +@property (class, readonly) DayOfWeek *thursday; +@property (class, readonly) DayOfWeek *friday; +@property (class, readonly) DayOfWeek *saturday; +@property (class, readonly) DayOfWeek *sunday; ++ (KotlinArray *)values; +@property (class, readonly) NSArray *entries; @end @interface TimeZone : Base -@property (class, readonly, getter=companion) TimeZoneCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) TimeZoneCompanion *companion; - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSUInteger)hash; - (Instant *)toInstant:(LocalDateTime *)receiver __attribute__((swift_name("toInstant(_:)"))); - (LocalDateTime *)toLocalDateTime:(Instant *)receiver __attribute__((swift_name("toLocalDateTime(_:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); +- (NSString *)description; +@property (readonly) NSString *id; @end __attribute__((objc_subclassing_restricted)) @interface FixedOffsetTimeZone : TimeZone - (instancetype)initWithOffset:(UtcOffset *)offset __attribute__((swift_name("init(offset:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) FixedOffsetTimeZoneCompanion *companion __attribute__((swift_name("companion"))); -@property (readonly) NSString *id __attribute__((swift_name("id"))); -@property (readonly) UtcOffset *offset __attribute__((swift_name("offset"))); -@property (readonly) int32_t totalSeconds __attribute__((swift_name("totalSeconds"))) __attribute__((deprecated("Use offset.totalSeconds"))); +@property (class, readonly, getter=companion) FixedOffsetTimeZoneCompanion *companion; +@property (readonly) NSString *id; +@property (readonly) UtcOffset *offset; +@property (readonly) int32_t totalSeconds __attribute__((deprecated("Use offset.totalSeconds"))); @end __attribute__((objc_subclassing_restricted)) @@ -311,12 +311,12 @@ __attribute__((swift_name("FixedOffsetTimeZone.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) FixedOffsetTimeZoneCompanion *shared __attribute__((swift_name("shared"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +@property (class, readonly, getter=shared) FixedOffsetTimeZoneCompanion *shared; +- (KSerializer *)serializer; @end @interface KotlinIllegalArgumentException : KotlinRuntimeException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -325,7 +325,7 @@ __attribute__((swift_name("FixedOffsetTimeZone.Companion"))) __attribute__((objc_subclassing_restricted)) @interface IllegalTimeZoneException : KotlinIllegalArgumentException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString *)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable *)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -334,17 +334,17 @@ __attribute__((objc_subclassing_restricted)) __attribute__((objc_subclassing_restricted)) @interface Instant : Base -@property (class, readonly, getter=companion) InstantCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) InstantCompanion *companion; - (int32_t)compareToOther:(Instant *)other __attribute__((swift_name("compareTo(other:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSUInteger)hash; - (Instant *)minusDuration:(int64_t)duration __attribute__((swift_name("minus(duration:)"))); - (int64_t)minusOther:(Instant *)other __attribute__((swift_name("minus(other:)"))); - (Instant *)plusDuration:(int64_t)duration __attribute__((swift_name("plus(duration:)"))); -- (int64_t)toEpochMilliseconds __attribute__((swift_name("toEpochMilliseconds()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int64_t epochSeconds __attribute__((swift_name("epochSeconds"))); -@property (readonly) int32_t nanosecondsOfSecond __attribute__((swift_name("nanosecondsOfSecond"))); +- (int64_t)toEpochMilliseconds; +- (NSString *)description; +@property (readonly) int64_t epochSeconds; +@property (readonly) int32_t nanosecondsOfSecond; @end __attribute__((objc_subclassing_restricted)) @@ -353,13 +353,13 @@ __attribute__((swift_name("Instant.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) InstantCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) InstantCompanion *shared; - (Instant *)fromEpochMillisecondsEpochMilliseconds:(int64_t)epochMilliseconds __attribute__((swift_name("fromEpochMilliseconds(epochMilliseconds:)"))); - (Instant *)fromEpochSecondsEpochSeconds:(int64_t)epochSeconds nanosecondAdjustment:(int32_t)nanosecondAdjustment __attribute__((swift_name("fromEpochSeconds(epochSeconds:nanosecondAdjustment:)"))); - (Instant *)fromEpochSecondsEpochSeconds:(int64_t)epochSeconds nanosecondAdjustment_:(int64_t)nanosecondAdjustment __attribute__((swift_name("fromEpochSeconds(epochSeconds:nanosecondAdjustment_:)"))); -- (Instant *)now __attribute__((swift_name("now()"))) __attribute__((unavailable("Use Clock.System.now() instead"))); +- (Instant *)now __attribute__((unavailable("Use Clock.System.now() instead"))); - (Instant *)parseInput:(id)input format:(id)format __attribute__((swift_name("parse(input:format:)"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +- (KSerializer *)serializer; @property (readonly) Instant *DISTANT_FUTURE __attribute__((swift_name("DISTANT_FUTURE"))); @property (readonly) Instant *DISTANT_PAST __attribute__((swift_name("DISTANT_PAST"))); @end @@ -368,18 +368,18 @@ __attribute__((objc_subclassing_restricted)) @interface LocalDate : Base - (instancetype)initWithYear:(int32_t)year monthNumber:(int32_t)monthNumber dayOfMonth:(int32_t)dayOfMonth __attribute__((swift_name("init(year:monthNumber:dayOfMonth:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithYear:(int32_t)year month:(Month *)month dayOfMonth:(int32_t)dayOfMonth __attribute__((swift_name("init(year:month:dayOfMonth:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) LocalDateCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) LocalDateCompanion *companion; - (int32_t)compareToOther:(LocalDate *)other __attribute__((swift_name("compareTo(other:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (int32_t)toEpochDays __attribute__((swift_name("toEpochDays()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t dayOfMonth __attribute__((swift_name("dayOfMonth"))); -@property (readonly) DayOfWeek *dayOfWeek __attribute__((swift_name("dayOfWeek"))); -@property (readonly) int32_t dayOfYear __attribute__((swift_name("dayOfYear"))); -@property (readonly) Month *month __attribute__((swift_name("month"))); -@property (readonly) int32_t monthNumber __attribute__((swift_name("monthNumber"))); -@property (readonly) int32_t year __attribute__((swift_name("year"))); +- (NSUInteger)hash; +- (int32_t)toEpochDays; +- (NSString *)description; +@property (readonly) int32_t dayOfMonth; +@property (readonly) DayOfWeek *dayOfWeek; +@property (readonly) int32_t dayOfYear; +@property (readonly) Month *month; +@property (readonly) int32_t monthNumber; +@property (readonly) int32_t year; @end __attribute__((objc_subclassing_restricted)) @@ -388,11 +388,11 @@ __attribute__((swift_name("LocalDate.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) LocalDateCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) LocalDateCompanion *shared; - (id)FormatBlock:(void (^)(id))block __attribute__((swift_name("Format(block:)"))); - (LocalDate *)fromEpochDaysEpochDays:(int32_t)epochDays __attribute__((swift_name("fromEpochDays(epochDays:)"))); - (LocalDate *)parseInput:(id)input format:(id)format __attribute__((swift_name("parse(input:format:)"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +- (KSerializer *)serializer; @end __attribute__((objc_subclassing_restricted)) @@ -401,7 +401,7 @@ __attribute__((swift_name("LocalDate.Formats"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)formats __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) LocalDateFormats *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) LocalDateFormats *shared; @property (readonly) id ISO __attribute__((swift_name("ISO"))); @property (readonly) id ISO_BASIC __attribute__((swift_name("ISO_BASIC"))); @end @@ -411,23 +411,23 @@ __attribute__((objc_subclassing_restricted)) - (instancetype)initWithDate:(LocalDate *)date time:(LocalTime *)time __attribute__((swift_name("init(date:time:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithYear:(int32_t)year monthNumber:(int32_t)monthNumber dayOfMonth:(int32_t)dayOfMonth hour:(int32_t)hour minute:(int32_t)minute second:(int32_t)second nanosecond:(int32_t)nanosecond __attribute__((swift_name("init(year:monthNumber:dayOfMonth:hour:minute:second:nanosecond:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithYear:(int32_t)year month:(Month *)month dayOfMonth:(int32_t)dayOfMonth hour:(int32_t)hour minute:(int32_t)minute second:(int32_t)second nanosecond:(int32_t)nanosecond __attribute__((swift_name("init(year:month:dayOfMonth:hour:minute:second:nanosecond:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) LocalDateTimeCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) LocalDateTimeCompanion *companion; - (int32_t)compareToOther:(LocalDateTime *)other __attribute__((swift_name("compareTo(other:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) LocalDate *date __attribute__((swift_name("date"))); -@property (readonly) int32_t dayOfMonth __attribute__((swift_name("dayOfMonth"))); -@property (readonly) DayOfWeek *dayOfWeek __attribute__((swift_name("dayOfWeek"))); -@property (readonly) int32_t dayOfYear __attribute__((swift_name("dayOfYear"))); -@property (readonly) int32_t hour __attribute__((swift_name("hour"))); -@property (readonly) int32_t minute __attribute__((swift_name("minute"))); -@property (readonly) Month *month __attribute__((swift_name("month"))); -@property (readonly) int32_t monthNumber __attribute__((swift_name("monthNumber"))); -@property (readonly) int32_t nanosecond __attribute__((swift_name("nanosecond"))); -@property (readonly) int32_t second __attribute__((swift_name("second"))); -@property (readonly) LocalTime *time __attribute__((swift_name("time"))); -@property (readonly) int32_t year __attribute__((swift_name("year"))); +- (NSUInteger)hash; +- (NSString *)description; +@property (readonly) LocalDate *date; +@property (readonly) int32_t dayOfMonth; +@property (readonly) DayOfWeek *dayOfWeek; +@property (readonly) int32_t dayOfYear; +@property (readonly) int32_t hour; +@property (readonly) int32_t minute; +@property (readonly) Month *month; +@property (readonly) int32_t monthNumber; +@property (readonly) int32_t nanosecond; +@property (readonly) int32_t second; +@property (readonly) LocalTime *time; +@property (readonly) int32_t year; @end __attribute__((objc_subclassing_restricted)) @@ -436,10 +436,10 @@ __attribute__((swift_name("LocalDateTime.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) LocalDateTimeCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) LocalDateTimeCompanion *shared; - (id)FormatBuilder:(void (^)(id))builder __attribute__((swift_name("Format(builder:)"))); - (LocalDateTime *)parseInput:(id)input format:(id)format __attribute__((swift_name("parse(input:format:)"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +- (KSerializer *)serializer; @end __attribute__((objc_subclassing_restricted)) @@ -448,25 +448,25 @@ __attribute__((swift_name("LocalDateTime.Formats"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)formats __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) LocalDateTimeFormats *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) LocalDateTimeFormats *shared; @property (readonly) id ISO __attribute__((swift_name("ISO"))); @end __attribute__((objc_subclassing_restricted)) @interface LocalTime : Base - (instancetype)initWithHour:(int32_t)hour minute:(int32_t)minute second:(int32_t)second nanosecond:(int32_t)nanosecond __attribute__((swift_name("init(hour:minute:second:nanosecond:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) LocalTimeCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) LocalTimeCompanion *companion; - (int32_t)compareToOther:(LocalTime *)other __attribute__((swift_name("compareTo(other:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (int32_t)toMillisecondOfDay __attribute__((swift_name("toMillisecondOfDay()"))); -- (int64_t)toNanosecondOfDay __attribute__((swift_name("toNanosecondOfDay()"))); -- (int32_t)toSecondOfDay __attribute__((swift_name("toSecondOfDay()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t hour __attribute__((swift_name("hour"))); -@property (readonly) int32_t minute __attribute__((swift_name("minute"))); -@property (readonly) int32_t nanosecond __attribute__((swift_name("nanosecond"))); -@property (readonly) int32_t second __attribute__((swift_name("second"))); +- (NSUInteger)hash; +- (int32_t)toMillisecondOfDay; +- (int64_t)toNanosecondOfDay; +- (int32_t)toSecondOfDay; +- (NSString *)description; +@property (readonly) int32_t hour; +@property (readonly) int32_t minute; +@property (readonly) int32_t nanosecond; +@property (readonly) int32_t second; @end __attribute__((objc_subclassing_restricted)) @@ -475,13 +475,13 @@ __attribute__((swift_name("LocalTime.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) LocalTimeCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) LocalTimeCompanion *shared; - (id)FormatBuilder:(void (^)(id))builder __attribute__((swift_name("Format(builder:)"))); - (LocalTime *)fromMillisecondOfDayMillisecondOfDay:(int32_t)millisecondOfDay __attribute__((swift_name("fromMillisecondOfDay(millisecondOfDay:)"))); - (LocalTime *)fromNanosecondOfDayNanosecondOfDay:(int64_t)nanosecondOfDay __attribute__((swift_name("fromNanosecondOfDay(nanosecondOfDay:)"))); - (LocalTime *)fromSecondOfDaySecondOfDay:(int32_t)secondOfDay __attribute__((swift_name("fromSecondOfDay(secondOfDay:)"))); - (LocalTime *)parseInput:(id)input format:(id)format __attribute__((swift_name("parse(input:format:)"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +- (KSerializer *)serializer; @end __attribute__((objc_subclassing_restricted)) @@ -490,7 +490,7 @@ __attribute__((swift_name("LocalTime.Formats"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)formats __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) LocalTimeFormats *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) LocalTimeFormats *shared; @property (readonly) id ISO __attribute__((swift_name("ISO"))); @end @@ -499,20 +499,20 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) Month *january __attribute__((swift_name("january"))); -@property (class, readonly) Month *february __attribute__((swift_name("february"))); -@property (class, readonly) Month *march __attribute__((swift_name("march"))); -@property (class, readonly) Month *april __attribute__((swift_name("april"))); -@property (class, readonly) Month *may __attribute__((swift_name("may"))); -@property (class, readonly) Month *june __attribute__((swift_name("june"))); -@property (class, readonly) Month *july __attribute__((swift_name("july"))); -@property (class, readonly) Month *august __attribute__((swift_name("august"))); -@property (class, readonly) Month *september __attribute__((swift_name("september"))); -@property (class, readonly) Month *october __attribute__((swift_name("october"))); -@property (class, readonly) Month *november __attribute__((swift_name("november"))); -@property (class, readonly) Month *december __attribute__((swift_name("december"))); -+ (KotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@property (class, readonly) Month *january; +@property (class, readonly) Month *february; +@property (class, readonly) Month *march; +@property (class, readonly) Month *april; +@property (class, readonly) Month *may; +@property (class, readonly) Month *june; +@property (class, readonly) Month *july; +@property (class, readonly) Month *august; +@property (class, readonly) Month *september; +@property (class, readonly) Month *october; +@property (class, readonly) Month *november; +@property (class, readonly) Month *december; ++ (KotlinArray *)values; +@property (class, readonly) NSArray *entries; @end __attribute__((objc_subclassing_restricted)) @@ -521,21 +521,21 @@ __attribute__((swift_name("TimeZone.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) TimeZoneCompanion *shared __attribute__((swift_name("shared"))); -- (TimeZone *)currentSystemDefault __attribute__((swift_name("currentSystemDefault()"))); +@property (class, readonly, getter=shared) TimeZoneCompanion *shared; +- (TimeZone *)currentSystemDefault; - (TimeZone *)ofZoneId:(NSString *)zoneId __attribute__((swift_name("of(zoneId:)"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +- (KSerializer *)serializer; @property (readonly) FixedOffsetTimeZone *UTC __attribute__((swift_name("UTC"))); -@property (readonly) NSSet *availableZoneIds __attribute__((swift_name("availableZoneIds"))); +@property (readonly) NSSet *availableZoneIds; @end __attribute__((objc_subclassing_restricted)) @interface UtcOffset : Base -@property (class, readonly, getter=companion) UtcOffsetCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) UtcOffsetCompanion *companion; - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t totalSeconds __attribute__((swift_name("totalSeconds"))); +- (NSUInteger)hash; +- (NSString *)description; +@property (readonly) int32_t totalSeconds; @end __attribute__((objc_subclassing_restricted)) @@ -544,10 +544,10 @@ __attribute__((swift_name("UtcOffset.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) UtcOffsetCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) UtcOffsetCompanion *shared; - (id)FormatBlock:(void (^)(id))block __attribute__((swift_name("Format(block:)"))); - (UtcOffset *)parseInput:(id)input format:(id)format __attribute__((swift_name("parse(input:format:)"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +- (KSerializer *)serializer; @property (readonly) UtcOffset *ZERO __attribute__((swift_name("ZERO"))); @end @@ -557,7 +557,7 @@ __attribute__((swift_name("UtcOffset.Formats"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)formats __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) UtcOffsetFormats *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) UtcOffsetFormats *shared; @property (readonly) id FOUR_DIGITS __attribute__((swift_name("FOUR_DIGITS"))); @property (readonly) id ISO __attribute__((swift_name("ISO"))); @property (readonly) id ISO_BASIC __attribute__((swift_name("ISO_BASIC"))); @@ -568,42 +568,42 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) AmPmMarker *am __attribute__((swift_name("am"))); -@property (class, readonly) AmPmMarker *pm __attribute__((swift_name("pm"))); -+ (KotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@property (class, readonly) AmPmMarker *am; +@property (class, readonly) AmPmMarker *pm; ++ (KotlinArray *)values; +@property (class, readonly) NSArray *entries; @end __attribute__((objc_subclassing_restricted)) @interface DateTimeComponents : Base -@property (class, readonly, getter=companion) DateTimeComponentsCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) DateTimeComponentsCompanion *companion; - (void)setDateLocalDate:(LocalDate *)localDate __attribute__((swift_name("setDate(localDate:)"))); - (void)setDateTimeLocalDateTime:(LocalDateTime *)localDateTime __attribute__((swift_name("setDateTime(localDateTime:)"))); - (void)setDateTimeOffsetInstant:(Instant *)instant utcOffset:(UtcOffset *)utcOffset __attribute__((swift_name("setDateTimeOffset(instant:utcOffset:)"))); - (void)setDateTimeOffsetLocalDateTime:(LocalDateTime *)localDateTime utcOffset:(UtcOffset *)utcOffset __attribute__((swift_name("setDateTimeOffset(localDateTime:utcOffset:)"))); - (void)setOffsetUtcOffset:(UtcOffset *)utcOffset __attribute__((swift_name("setOffset(utcOffset:)"))); - (void)setTimeLocalTime:(LocalTime *)localTime __attribute__((swift_name("setTime(localTime:)"))); -- (Instant *)toInstantUsingOffset __attribute__((swift_name("toInstantUsingOffset()"))); -- (LocalDate *)toLocalDate __attribute__((swift_name("toLocalDate()"))); -- (LocalDateTime *)toLocalDateTime __attribute__((swift_name("toLocalDateTime()"))); -- (LocalTime *)toLocalTime __attribute__((swift_name("toLocalTime()"))); -- (UtcOffset *)toUtcOffset __attribute__((swift_name("toUtcOffset()"))); -@property AmPmMarker * _Nullable amPm __attribute__((swift_name("amPm"))); -@property Int * _Nullable dayOfMonth __attribute__((swift_name("dayOfMonth"))); -@property DayOfWeek * _Nullable dayOfWeek __attribute__((swift_name("dayOfWeek"))); -@property Int * _Nullable hour __attribute__((swift_name("hour"))); -@property Int * _Nullable hourOfAmPm __attribute__((swift_name("hourOfAmPm"))); -@property Int * _Nullable minute __attribute__((swift_name("minute"))); -@property Month * _Nullable month __attribute__((swift_name("month"))); -@property Int * _Nullable monthNumber __attribute__((swift_name("monthNumber"))); -@property Int * _Nullable nanosecond __attribute__((swift_name("nanosecond"))); -@property Int * _Nullable offsetHours __attribute__((swift_name("offsetHours"))); -@property Boolean * _Nullable offsetIsNegative __attribute__((swift_name("offsetIsNegative"))); -@property Int * _Nullable offsetMinutesOfHour __attribute__((swift_name("offsetMinutesOfHour"))); -@property Int * _Nullable offsetSecondsOfMinute __attribute__((swift_name("offsetSecondsOfMinute"))); -@property Int * _Nullable second __attribute__((swift_name("second"))); -@property NSString * _Nullable timeZoneId __attribute__((swift_name("timeZoneId"))); -@property Int * _Nullable year __attribute__((swift_name("year"))); +- (Instant *)toInstantUsingOffset; +- (LocalDate *)toLocalDate; +- (LocalDateTime *)toLocalDateTime; +- (LocalTime *)toLocalTime; +- (UtcOffset *)toUtcOffset; +@property AmPmMarker * _Nullable amPm; +@property Int * _Nullable dayOfMonth; +@property DayOfWeek * _Nullable dayOfWeek; +@property Int * _Nullable hour; +@property Int * _Nullable hourOfAmPm; +@property Int * _Nullable minute; +@property Month * _Nullable month; +@property Int * _Nullable monthNumber; +@property Int * _Nullable nanosecond; +@property Int * _Nullable offsetHours; +@property Boolean * _Nullable offsetIsNegative; +@property Int * _Nullable offsetMinutesOfHour; +@property Int * _Nullable offsetSecondsOfMinute; +@property Int * _Nullable second; +@property NSString * _Nullable timeZoneId; +@property Int * _Nullable year; @end __attribute__((objc_subclassing_restricted)) @@ -612,7 +612,7 @@ __attribute__((swift_name("DateTimeComponents.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DateTimeComponentsCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) DateTimeComponentsCompanion *shared; - (id)FormatBlock:(void (^)(id))block __attribute__((swift_name("Format(block:)"))); @end @@ -622,7 +622,7 @@ __attribute__((swift_name("DateTimeComponents.Formats"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)formats __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DateTimeComponentsFormats *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) DateTimeComponentsFormats *shared; @property (readonly) id ISO_DATE_TIME_OFFSET __attribute__((swift_name("ISO_DATE_TIME_OFFSET"))); @property (readonly) id RFC_1123 __attribute__((swift_name("RFC_1123"))); @end @@ -640,7 +640,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DateTimeFormatCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) DateTimeFormatCompanion *shared; - (NSString *)formatAsKotlinBuilderDslFormat:(id)format __attribute__((swift_name("formatAsKotlinBuilderDsl(format:)"))); @end @@ -688,18 +688,18 @@ __attribute__((objc_subclassing_restricted)) @protocol DateTimeFormatBuilderWithDateTimeComponents @required - (void)dateTimeComponentsFormat:(id)format __attribute__((swift_name("dateTimeComponents(format:)"))); -- (void)timeZoneId __attribute__((swift_name("timeZoneId()"))); +- (void)timeZoneId; @end __attribute__((objc_subclassing_restricted)) @interface DayOfWeekNames : Base - (instancetype)initWithNames:(NSArray *)names __attribute__((swift_name("init(names:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithMonday:(NSString *)monday tuesday:(NSString *)tuesday wednesday:(NSString *)wednesday thursday:(NSString *)thursday friday:(NSString *)friday saturday:(NSString *)saturday sunday:(NSString *)sunday __attribute__((swift_name("init(monday:tuesday:wednesday:thursday:friday:saturday:sunday:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) DayOfWeekNamesCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) DayOfWeekNamesCompanion *companion; - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSArray *names __attribute__((swift_name("names"))); +- (NSUInteger)hash; +- (NSString *)description; +@property (readonly) NSArray *names; @end __attribute__((objc_subclassing_restricted)) @@ -708,7 +708,7 @@ __attribute__((swift_name("DayOfWeekNames.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DayOfWeekNamesCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) DayOfWeekNamesCompanion *shared; @property (readonly) DayOfWeekNames *ENGLISH_ABBREVIATED __attribute__((swift_name("ENGLISH_ABBREVIATED"))); @property (readonly) DayOfWeekNames *ENGLISH_FULL __attribute__((swift_name("ENGLISH_FULL"))); @end @@ -717,11 +717,11 @@ __attribute__((objc_subclassing_restricted)) @interface MonthNames : Base - (instancetype)initWithNames:(NSArray *)names __attribute__((swift_name("init(names:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithJanuary:(NSString *)january february:(NSString *)february march:(NSString *)march april:(NSString *)april may:(NSString *)may june:(NSString *)june july:(NSString *)july august:(NSString *)august september:(NSString *)september october:(NSString *)october november:(NSString *)november december:(NSString *)december __attribute__((swift_name("init(january:february:march:april:may:june:july:august:september:october:november:december:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) MonthNamesCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) MonthNamesCompanion *companion; - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSArray *names __attribute__((swift_name("names"))); +- (NSUInteger)hash; +- (NSString *)description; +@property (readonly) NSArray *names; @end __attribute__((objc_subclassing_restricted)) @@ -730,7 +730,7 @@ __attribute__((swift_name("MonthNames.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) MonthNamesCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) MonthNamesCompanion *shared; @property (readonly) MonthNames *ENGLISH_ABBREVIATED __attribute__((swift_name("ENGLISH_ABBREVIATED"))); @property (readonly) MonthNames *ENGLISH_FULL __attribute__((swift_name("ENGLISH_FULL"))); @end @@ -740,11 +740,11 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) Padding *none __attribute__((swift_name("none"))); -@property (class, readonly) Padding *zero __attribute__((swift_name("zero"))); -@property (class, readonly) Padding *space __attribute__((swift_name("space"))); -+ (KotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@property (class, readonly) Padding *none; +@property (class, readonly) Padding *zero; +@property (class, readonly) Padding *space; ++ (KotlinArray *)values; +@property (class, readonly) NSArray *entries; @end __attribute__((objc_subclassing_restricted)) @@ -756,11 +756,11 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)dateBasedDateTimeUnitSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DateBasedDateTimeUnitSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) DateBasedDateTimeUnitSerializer *shared; - (DeserializationStrategy * _Nullable)findPolymorphicSerializerOrNullDecoder:(CompositeDecoder *)decoder klassName:(NSString * _Nullable)klassName __attribute__((swift_name("findPolymorphicSerializerOrNull(decoder:klassName:)"))); - (SerializationStrategy * _Nullable)findPolymorphicSerializerOrNullEncoder:(Encoder *)encoder value:(DateTimeUnitDateBased *)value __attribute__((swift_name("findPolymorphicSerializerOrNull(encoder:value:)"))); -@property (readonly) id baseClass __attribute__((swift_name("baseClass"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) id baseClass; +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -772,10 +772,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)datePeriodComponentSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DatePeriodComponentSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) DatePeriodComponentSerializer *shared; - (DatePeriod *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(DatePeriod *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -783,10 +783,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)datePeriodIso8601Serializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DatePeriodIso8601Serializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) DatePeriodIso8601Serializer *shared; - (DatePeriod *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(DatePeriod *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -794,10 +794,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)dateTimePeriodComponentSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DateTimePeriodComponentSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) DateTimePeriodComponentSerializer *shared; - (DateTimePeriod *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(DateTimePeriod *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -805,10 +805,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)dateTimePeriodIso8601Serializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DateTimePeriodIso8601Serializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) DateTimePeriodIso8601Serializer *shared; - (DateTimePeriod *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(DateTimePeriod *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -816,11 +816,11 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)dateTimeUnitSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DateTimeUnitSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) DateTimeUnitSerializer *shared; - (DeserializationStrategy * _Nullable)findPolymorphicSerializerOrNullDecoder:(CompositeDecoder *)decoder klassName:(NSString * _Nullable)klassName __attribute__((swift_name("findPolymorphicSerializerOrNull(decoder:klassName:)"))); - (SerializationStrategy * _Nullable)findPolymorphicSerializerOrNullEncoder:(Encoder *)encoder value:(DateTimeUnit *)value __attribute__((swift_name("findPolymorphicSerializerOrNull(encoder:value:)"))); -@property (readonly) id baseClass __attribute__((swift_name("baseClass"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) id baseClass; +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -828,10 +828,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)dayBasedDateTimeUnitSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DayBasedDateTimeUnitSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) DayBasedDateTimeUnitSerializer *shared; - (DateTimeUnitDayBased *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(DateTimeUnitDayBased *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -839,10 +839,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)dayOfWeekSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) DayOfWeekSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) DayOfWeekSerializer *shared; - (DayOfWeek *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(DayOfWeek *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -850,10 +850,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)fixedOffsetTimeZoneSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) FixedOffsetTimeZoneSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) FixedOffsetTimeZoneSerializer *shared; - (FixedOffsetTimeZone *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(FixedOffsetTimeZone *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -861,10 +861,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)instantComponentSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) InstantComponentSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) InstantComponentSerializer *shared; - (Instant *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(Instant *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -872,10 +872,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)instantIso8601Serializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) InstantIso8601Serializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) InstantIso8601Serializer *shared; - (Instant *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(Instant *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -883,10 +883,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)localDateComponentSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) LocalDateComponentSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) LocalDateComponentSerializer *shared; - (LocalDate *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(LocalDate *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -894,10 +894,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)localDateIso8601Serializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) LocalDateIso8601Serializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) LocalDateIso8601Serializer *shared; - (LocalDate *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(LocalDate *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -905,10 +905,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)localDateTimeComponentSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) LocalDateTimeComponentSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) LocalDateTimeComponentSerializer *shared; - (LocalDateTime *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(LocalDateTime *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -916,10 +916,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)localDateTimeIso8601Serializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) LocalDateTimeIso8601Serializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) LocalDateTimeIso8601Serializer *shared; - (LocalDateTime *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(LocalDateTime *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -927,10 +927,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)localTimeComponentSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) LocalTimeComponentSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) LocalTimeComponentSerializer *shared; - (LocalTime *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(LocalTime *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -938,10 +938,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)localTimeIso8601Serializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) LocalTimeIso8601Serializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) LocalTimeIso8601Serializer *shared; - (LocalTime *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(LocalTime *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -949,10 +949,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)monthBasedDateTimeUnitSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) MonthBasedDateTimeUnitSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) MonthBasedDateTimeUnitSerializer *shared; - (DateTimeUnitMonthBased *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(DateTimeUnitMonthBased *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -960,10 +960,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)monthSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) MonthSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) MonthSerializer *shared; - (Month *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(Month *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -971,10 +971,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)timeBasedDateTimeUnitSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) TimeBasedDateTimeUnitSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) TimeBasedDateTimeUnitSerializer *shared; - (DateTimeUnitTimeBased *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(DateTimeUnitTimeBased *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -982,10 +982,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)timeZoneSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) TimeZoneSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) TimeZoneSerializer *shared; - (TimeZone *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(TimeZone *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -993,10 +993,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)utcOffsetSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) UtcOffsetSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) UtcOffsetSerializer *shared; - (UtcOffset *)deserializeDecoder:(Decoder *)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(UtcOffset *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -1091,9 +1091,9 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end __attribute__((objc_subclassing_restricted)) @@ -1101,7 +1101,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinEnumCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinEnumCompanion *shared; @end @protocol KotlinAppendable @@ -1167,8 +1167,8 @@ __attribute__((objc_subclassing_restricted)) * kotlin.SinceKotlin(version="1.1") */ - (BOOL)isInstanceValue:(id _Nullable)value __attribute__((swift_name("isInstance(value:)"))); -@property (readonly) NSString * _Nullable qualifiedName __attribute__((swift_name("qualifiedName"))); -@property (readonly) NSString * _Nullable simpleName __attribute__((swift_name("simpleName"))); +@property (readonly) NSString * _Nullable qualifiedName; +@property (readonly) NSString * _Nullable simpleName; @end __attribute__((objc_subclassing_restricted)) @@ -1190,7 +1190,7 @@ __attribute__((objc_subclassing_restricted)) */ @protocol KotlinTimeSource @required -- (id)markNow __attribute__((swift_name("markNow()"))); +- (id)markNow; @end @@ -1207,14 +1207,14 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)unit __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinUnit *shared __attribute__((swift_name("shared"))); -- (NSString *)description __attribute__((swift_name("description()"))); +@property (class, readonly, getter=shared) KotlinUnit *shared; +- (NSString *)description; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end @@ -1224,9 +1224,9 @@ __attribute__((objc_subclassing_restricted)) */ @protocol KotlinTimeMark @required -- (int64_t)elapsedNow __attribute__((swift_name("elapsedNow()"))); -- (BOOL)hasNotPassedNow __attribute__((swift_name("hasNotPassedNow()"))); -- (BOOL)hasPassedNow __attribute__((swift_name("hasPassedNow()"))); +- (int64_t)elapsedNow; +- (BOOL)hasNotPassedNow; +- (BOOL)hasPassedNow; - (id)minusDuration:(int64_t)duration __attribute__((swift_name("minus(duration:)"))); - (id)plusDuration:(int64_t)duration __attribute__((swift_name("plus(duration:)"))); @end @@ -1244,7 +1244,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface DayOfWeek (Extensions) -@property (readonly) int32_t isoDayNumber __attribute__((swift_name("isoDayNumber"))); +@property (readonly) int32_t isoDayNumber; @end @interface Instant (Extensions) @@ -1271,12 +1271,12 @@ __attribute__((objc_subclassing_restricted)) - (Instant *)plusValue:(int32_t)value unit:(DateTimeUnit *)unit timeZone:(TimeZone *)timeZone __attribute__((swift_name("plus(value:unit:timeZone:)"))); - (Instant *)plusValue:(int64_t)value unit:(DateTimeUnit *)unit timeZone_:(TimeZone *)timeZone __attribute__((swift_name("plus(value:unit:timeZone_:)"))); - (LocalDateTime *)toLocalDateTimeTimeZone:(TimeZone *)timeZone __attribute__((swift_name("toLocalDateTime(timeZone:)"))); -- (NSDate *)toNSDate __attribute__((swift_name("toNSDate()"))); +- (NSDate *)toNSDate; - (int64_t)untilOther:(Instant *)other unit:(DateTimeUnitTimeBased *)unit __attribute__((swift_name("until(other:unit:)"))); - (int64_t)untilOther:(Instant *)other unit:(DateTimeUnit *)unit timeZone:(TimeZone *)timeZone __attribute__((swift_name("until(other:unit:timeZone:)"))); - (int32_t)yearsUntilOther:(Instant *)other timeZone:(TimeZone *)timeZone __attribute__((swift_name("yearsUntil(other:timeZone:)"))); -@property (readonly) BOOL isDistantFuture __attribute__((swift_name("isDistantFuture"))); -@property (readonly) BOOL isDistantPast __attribute__((swift_name("isDistantPast"))); +@property (readonly) BOOL isDistantFuture; +@property (readonly) BOOL isDistantPast; @end @interface LocalDate (Extensions) @@ -1296,7 +1296,7 @@ __attribute__((objc_subclassing_restricted)) - (LocalDate *)plusUnit:(DateTimeUnitDateBased *)unit __attribute__((swift_name("plus(unit:)"))) __attribute__((deprecated("Use the plus overload with an explicit number of units"))); - (LocalDate *)plusValue:(int32_t)value unit:(DateTimeUnitDateBased *)unit __attribute__((swift_name("plus(value:unit:)"))); - (LocalDate *)plusValue:(int64_t)value unit_:(DateTimeUnitDateBased *)unit __attribute__((swift_name("plus(value:unit_:)"))); -- (NSDateComponents *)toNSDateComponents __attribute__((swift_name("toNSDateComponents()"))); +- (NSDateComponents *)toNSDateComponents; - (int32_t)untilOther:(LocalDate *)other unit:(DateTimeUnitDateBased *)unit __attribute__((swift_name("until(other:unit:)"))); - (int32_t)yearsUntilOther:(LocalDate *)other __attribute__((swift_name("yearsUntil(other:)"))); @end @@ -1305,7 +1305,7 @@ __attribute__((objc_subclassing_restricted)) - (NSString *)formatFormat:(id)format __attribute__((swift_name("format(format:)"))); - (Instant *)toInstantTimeZone:(TimeZone *)timeZone __attribute__((swift_name("toInstant(timeZone:)"))); - (Instant *)toInstantOffset:(UtcOffset *)offset __attribute__((swift_name("toInstant(offset:)"))); -- (NSDateComponents *)toNSDateComponents __attribute__((swift_name("toNSDateComponents()"))); +- (NSDateComponents *)toNSDateComponents; @end @interface LocalTime (Extensions) @@ -1316,24 +1316,24 @@ __attribute__((objc_subclassing_restricted)) @end @interface Month (Extensions) -@property (readonly) int32_t number __attribute__((swift_name("number"))); +@property (readonly) int32_t number; @end @interface NSDate (Extensions) -- (Instant *)toKotlinInstant __attribute__((swift_name("toKotlinInstant()"))); +- (Instant *)toKotlinInstant; @end @interface NSTimeZone (Extensions) -- (TimeZone *)toKotlinTimeZone __attribute__((swift_name("toKotlinTimeZone()"))); +- (TimeZone *)toKotlinTimeZone; @end @interface TimeZone (Extensions) - (UtcOffset *)offsetAtInstant:(Instant *)instant __attribute__((swift_name("offsetAt(instant:)"))); -- (NSTimeZone *)toNSTimeZone __attribute__((swift_name("toNSTimeZone()"))); +- (NSTimeZone *)toNSTimeZone; @end @interface UtcOffset (Extensions) -- (FixedOffsetTimeZone *)asTimeZone __attribute__((swift_name("asTimeZone()"))); +- (FixedOffsetTimeZone *)asTimeZone; - (NSString *)formatFormat:(id)format __attribute__((swift_name("format(format:)"))); @end diff --git a/native/objcexport-header-generator/testData/dependencies/kotlinxSerializationCore/!kotlinxSerializationCore.h b/native/objcexport-header-generator/testData/dependencies/kotlinxSerializationCore/!kotlinxSerializationCore.h index 18235a3cf96fe..5aa217d023b52 100644 --- a/native/objcexport-header-generator/testData/dependencies/kotlinxSerializationCore/!kotlinxSerializationCore.h +++ b/native/objcexport-header-generator/testData/dependencies/kotlinxSerializationCore/!kotlinxSerializationCore.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol SerialFormat @required -@property (readonly) SerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) SerializersModule *serializersModule; @end @protocol BinaryFormat @@ -36,13 +36,13 @@ NS_ASSUME_NONNULL_BEGIN @protocol SerializationStrategy @required - (void)serializeEncoder:(id)encoder value:(id _Nullable)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) id descriptor; @end @protocol DeserializationStrategy @required - (id _Nullable)deserializeDecoder:(id)decoder __attribute__((swift_name("deserialize(decoder:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) id descriptor; @end @protocol KSerializer @@ -60,11 +60,11 @@ __attribute__((objc_subclassing_restricted)) - (instancetype)initWithSerializableClass:(id)serializableClass fallbackSerializer:(id _Nullable)fallbackSerializer typeArgumentsSerializers:(KotlinArray> *)typeArgumentsSerializers __attribute__((swift_name("init(serializableClass:fallbackSerializer:typeArgumentsSerializers:)"))) __attribute__((objc_designated_initializer)); - (T)deserializeDecoder:(id)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(id)encoder value:(T)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) id descriptor; @end @interface KotlinThrowable : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -74,16 +74,16 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlin.experimental.ExperimentalNativeApi */ -- (KotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); -- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) KotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); -@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); -- (NSError *)asError __attribute__((swift_name("asError()"))); +- (KotlinArray *)getStackTrace; +- (void)printStackTrace; +- (NSString *)description; +@property (readonly) KotlinThrowable * _Nullable cause; +@property (readonly) NSString * _Nullable message; +- (NSError *)asError; @end @interface KotlinException : KotlinThrowable -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -91,7 +91,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface KotlinRuntimeException : KotlinException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -99,7 +99,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface KotlinIllegalArgumentException : KotlinRuntimeException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -107,7 +107,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface SerializationException : KotlinIllegalArgumentException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -124,12 +124,12 @@ __attribute__((objc_subclassing_restricted)) - (instancetype)initWithMissingField:(NSString *)missingField serialName:(NSString *)serialName __attribute__((swift_name("init(missingField:serialName:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithMissingFields:(NSArray *)missingFields serialName:(NSString *)serialName __attribute__((swift_name("init(missingFields:serialName:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithMissingFields:(NSArray *)missingFields message:(NSString * _Nullable)message cause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(missingFields:message:cause:)"))) __attribute__((objc_designated_initializer)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); +- (instancetype)init __attribute__((objc_designated_initializer)) __attribute__((unavailable)); + (instancetype)new __attribute__((unavailable)); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); - (instancetype)initWithMessage:(NSString * _Nullable)message cause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(message:cause:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (readonly) NSArray *missingFields __attribute__((swift_name("missingFields"))); +@property (readonly) NSArray *missingFields; @end @@ -152,15 +152,15 @@ __attribute__((objc_subclassing_restricted)) */ - (id _Nullable)findPolymorphicSerializerOrNullEncoder:(id)encoder value:(T)value __attribute__((swift_name("findPolymorphicSerializerOrNull(encoder:value:)"))); - (void)serializeEncoder:(id)encoder value:(T)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) id baseClass __attribute__((swift_name("baseClass"))); +@property (readonly) id baseClass; @end __attribute__((objc_subclassing_restricted)) @interface PolymorphicSerializer : AbstractPolymorphicSerializer - (instancetype)initWithBaseClass:(id)baseClass __attribute__((swift_name("init(baseClass:)"))) __attribute__((objc_designated_initializer)); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id baseClass __attribute__((swift_name("baseClass"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +- (NSString *)description; +@property (readonly) id baseClass; +@property (readonly) id descriptor; @end @@ -173,8 +173,8 @@ __attribute__((objc_subclassing_restricted)) - (instancetype)initWithSerialName:(NSString *)serialName baseClass:(id)baseClass subclasses:(KotlinArray> *)subclasses subclassSerializers:(KotlinArray> *)subclassSerializers __attribute__((swift_name("init(serialName:baseClass:subclasses:subclassSerializers:)"))) __attribute__((objc_designated_initializer)); - (id _Nullable)findPolymorphicSerializerOrNullDecoder:(id)decoder klassName:(NSString * _Nullable)klassName __attribute__((swift_name("findPolymorphicSerializerOrNull(decoder:klassName:)"))); - (id _Nullable)findPolymorphicSerializerOrNullEncoder:(id)encoder value:(T)value __attribute__((swift_name("findPolymorphicSerializerOrNull(encoder:value:)"))); -@property (readonly) id baseClass __attribute__((swift_name("baseClass"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) id baseClass; +@property (readonly) id descriptor; @end @protocol StringFormat @@ -188,10 +188,10 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)longAsStringSerializer __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) LongAsStringSerializer *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) LongAsStringSerializer *shared; - (Long *)deserializeDecoder:(id)decoder __attribute__((swift_name("deserialize(decoder:)"))); - (void)serializeEncoder:(id)encoder value:(Long *)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) id descriptor; @end __attribute__((objc_subclassing_restricted)) @@ -202,14 +202,14 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property NSArray> *annotations __attribute__((swift_name("annotations"))); +@property NSArray> *annotations; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property BOOL isNullable __attribute__((swift_name("isNullable"))) __attribute__((unavailable("isNullable inside buildSerialDescriptor is deprecated. Please use SerialDescriptor.nullable extension on a builder result."))); -@property (readonly) NSString *serialName __attribute__((swift_name("serialName"))); +@property BOOL isNullable __attribute__((unavailable("isNullable inside buildSerialDescriptor is deprecated. Please use SerialDescriptor.nullable extension on a builder result."))); +@property (readonly) NSString *serialName; @end @@ -218,8 +218,8 @@ __attribute__((objc_subclassing_restricted)) * kotlinx.serialization.ExperimentalSerializationApi */ @interface SerialKind : Base -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); +- (NSUInteger)hash; +- (NSString *)description; @end @@ -236,7 +236,7 @@ __attribute__((swift_name("PolymorphicKind.OPEN"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)oPEN __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) PolymorphicKindOPEN *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) PolymorphicKindOPEN *shared; @end __attribute__((objc_subclassing_restricted)) @@ -245,7 +245,7 @@ __attribute__((swift_name("PolymorphicKind.SEALED"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)sEALED __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) PolymorphicKindSEALED *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) PolymorphicKindSEALED *shared; @end @interface PrimitiveKind : SerialKind @@ -257,7 +257,7 @@ __attribute__((swift_name("PrimitiveKind.BOOLEAN"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)bOOLEAN __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) PrimitiveKindBOOLEAN *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) PrimitiveKindBOOLEAN *shared; @end __attribute__((objc_subclassing_restricted)) @@ -266,7 +266,7 @@ __attribute__((swift_name("PrimitiveKind.BYTE"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)bYTE __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) PrimitiveKindBYTE *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) PrimitiveKindBYTE *shared; @end __attribute__((objc_subclassing_restricted)) @@ -275,7 +275,7 @@ __attribute__((swift_name("PrimitiveKind.CHAR"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)cHAR __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) PrimitiveKindCHAR *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) PrimitiveKindCHAR *shared; @end __attribute__((objc_subclassing_restricted)) @@ -284,7 +284,7 @@ __attribute__((swift_name("PrimitiveKind.DOUBLE"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)dOUBLE __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) PrimitiveKindDOUBLE *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) PrimitiveKindDOUBLE *shared; @end __attribute__((objc_subclassing_restricted)) @@ -293,7 +293,7 @@ __attribute__((swift_name("PrimitiveKind.FLOAT"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)fLOAT __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) PrimitiveKindFLOAT *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) PrimitiveKindFLOAT *shared; @end __attribute__((objc_subclassing_restricted)) @@ -302,7 +302,7 @@ __attribute__((swift_name("PrimitiveKind.INT"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)iNT __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) PrimitiveKindINT *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) PrimitiveKindINT *shared; @end __attribute__((objc_subclassing_restricted)) @@ -311,7 +311,7 @@ __attribute__((swift_name("PrimitiveKind.LONG"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)lONG __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) PrimitiveKindLONG *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) PrimitiveKindLONG *shared; @end __attribute__((objc_subclassing_restricted)) @@ -320,7 +320,7 @@ __attribute__((swift_name("PrimitiveKind.SHORT"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)sHORT __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) PrimitiveKindSHORT *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) PrimitiveKindSHORT *shared; @end __attribute__((objc_subclassing_restricted)) @@ -329,7 +329,7 @@ __attribute__((swift_name("PrimitiveKind.STRING"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)sTRING __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) PrimitiveKindSTRING *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) PrimitiveKindSTRING *shared; @end @protocol SerialDescriptor @@ -369,32 +369,32 @@ __attribute__((swift_name("PrimitiveKind.STRING"))) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) NSArray> *annotations __attribute__((swift_name("annotations"))); +@property (readonly) NSArray> *annotations; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) int32_t elementsCount __attribute__((swift_name("elementsCount"))); -@property (readonly) BOOL isInline __attribute__((swift_name("isInline"))); +@property (readonly) int32_t elementsCount; +@property (readonly) BOOL isInline; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) BOOL isNullable __attribute__((swift_name("isNullable"))); +@property (readonly) BOOL isNullable; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) SerialKind *kind __attribute__((swift_name("kind"))); +@property (readonly) SerialKind *kind; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) NSString *serialName __attribute__((swift_name("serialName"))); +@property (readonly) NSString *serialName; @end @@ -408,7 +408,7 @@ __attribute__((swift_name("SerialKind.CONTEXTUAL"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)cONTEXTUAL __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) SerialKindCONTEXTUAL *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) SerialKindCONTEXTUAL *shared; @end @@ -422,7 +422,7 @@ __attribute__((swift_name("SerialKind.ENUM"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)eNUM __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) SerialKindENUM *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) SerialKindENUM *shared; @end @@ -439,7 +439,7 @@ __attribute__((swift_name("StructureKind.CLASS"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)cLASS __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) StructureKindCLASS *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) StructureKindCLASS *shared; @end __attribute__((objc_subclassing_restricted)) @@ -448,7 +448,7 @@ __attribute__((swift_name("StructureKind.LIST"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)lIST __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) StructureKindLIST *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) StructureKindLIST *shared; @end __attribute__((objc_subclassing_restricted)) @@ -457,7 +457,7 @@ __attribute__((swift_name("StructureKind.MAP"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)mAP __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) StructureKindMAP *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) StructureKindMAP *shared; @end __attribute__((objc_subclassing_restricted)) @@ -466,33 +466,33 @@ __attribute__((swift_name("StructureKind.OBJECT"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)oBJECT __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) StructureKindOBJECT *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) StructureKindOBJECT *shared; @end @protocol Decoder @required - (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); -- (BOOL)decodeBoolean __attribute__((swift_name("decodeBoolean()"))); -- (int8_t)decodeByte __attribute__((swift_name("decodeByte()"))); -- (unichar)decodeChar __attribute__((swift_name("decodeChar()"))); -- (double)decodeDouble __attribute__((swift_name("decodeDouble()"))); +- (BOOL)decodeBoolean; +- (int8_t)decodeByte; +- (unichar)decodeChar; +- (double)decodeDouble; - (int32_t)decodeEnumEnumDescriptor:(id)enumDescriptor __attribute__((swift_name("decodeEnum(enumDescriptor:)"))); -- (float)decodeFloat __attribute__((swift_name("decodeFloat()"))); +- (float)decodeFloat; - (id)decodeInlineDescriptor:(id)descriptor __attribute__((swift_name("decodeInline(descriptor:)"))); -- (int32_t)decodeInt __attribute__((swift_name("decodeInt()"))); -- (int64_t)decodeLong __attribute__((swift_name("decodeLong()"))); +- (int32_t)decodeInt; +- (int64_t)decodeLong; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (BOOL)decodeNotNullMark __attribute__((swift_name("decodeNotNullMark()"))); +- (BOOL)decodeNotNullMark; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (KotlinNothing * _Nullable)decodeNull __attribute__((swift_name("decodeNull()"))); +- (KotlinNothing * _Nullable)decodeNull; /** * @note annotations @@ -500,9 +500,9 @@ __attribute__((swift_name("StructureKind.OBJECT"))) */ - (id _Nullable)decodeNullableSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeNullableSerializableValue(deserializer:)"))); - (id _Nullable)decodeSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeSerializableValue(deserializer:)"))); -- (int16_t)decodeShort __attribute__((swift_name("decodeShort()"))); -- (NSString *)decodeString __attribute__((swift_name("decodeString()"))); -@property (readonly) SerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +- (int16_t)decodeShort; +- (NSString *)decodeString; +@property (readonly) SerializersModule *serializersModule; @end @protocol CompositeDecoder @@ -528,12 +528,12 @@ __attribute__((swift_name("StructureKind.OBJECT"))) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (BOOL)decodeSequentially __attribute__((swift_name("decodeSequentially()"))); +- (BOOL)decodeSequentially; - (id _Nullable)decodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeSerializableElement(descriptor:index:deserializer:previousValue:)"))); - (int16_t)decodeShortElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeShortElement(descriptor:index:)"))); - (NSString *)decodeStringElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeStringElement(descriptor:index:)"))); - (void)endStructureDescriptor:(id)descriptor __attribute__((swift_name("endStructure(descriptor:)"))); -@property (readonly) SerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) SerializersModule *serializersModule; @end @@ -542,36 +542,36 @@ __attribute__((swift_name("StructureKind.OBJECT"))) * kotlinx.serialization.ExperimentalSerializationApi */ @interface AbstractDecoder : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); -- (BOOL)decodeBoolean __attribute__((swift_name("decodeBoolean()"))); +- (BOOL)decodeBoolean; - (BOOL)decodeBooleanElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeBooleanElement(descriptor:index:)"))); -- (int8_t)decodeByte __attribute__((swift_name("decodeByte()"))); +- (int8_t)decodeByte; - (int8_t)decodeByteElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeByteElement(descriptor:index:)"))); -- (unichar)decodeChar __attribute__((swift_name("decodeChar()"))); +- (unichar)decodeChar; - (unichar)decodeCharElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeCharElement(descriptor:index:)"))); -- (double)decodeDouble __attribute__((swift_name("decodeDouble()"))); +- (double)decodeDouble; - (double)decodeDoubleElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeDoubleElement(descriptor:index:)"))); - (int32_t)decodeEnumEnumDescriptor:(id)enumDescriptor __attribute__((swift_name("decodeEnum(enumDescriptor:)"))); -- (float)decodeFloat __attribute__((swift_name("decodeFloat()"))); +- (float)decodeFloat; - (float)decodeFloatElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeFloatElement(descriptor:index:)"))); - (id)decodeInlineDescriptor:(id)descriptor __attribute__((swift_name("decodeInline(descriptor:)"))); - (id)decodeInlineElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeInlineElement(descriptor:index:)"))); -- (int32_t)decodeInt __attribute__((swift_name("decodeInt()"))); +- (int32_t)decodeInt; - (int32_t)decodeIntElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeIntElement(descriptor:index:)"))); -- (int64_t)decodeLong __attribute__((swift_name("decodeLong()"))); +- (int64_t)decodeLong; - (int64_t)decodeLongElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeLongElement(descriptor:index:)"))); -- (BOOL)decodeNotNullMark __attribute__((swift_name("decodeNotNullMark()"))); -- (KotlinNothing * _Nullable)decodeNull __attribute__((swift_name("decodeNull()"))); +- (BOOL)decodeNotNullMark; +- (KotlinNothing * _Nullable)decodeNull; - (id _Nullable)decodeNullableSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeNullableSerializableElement(descriptor:index:deserializer:previousValue:)"))); - (id _Nullable)decodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeSerializableElement(descriptor:index:deserializer:previousValue:)"))); - (id _Nullable)decodeSerializableValueDeserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeSerializableValue(deserializer:previousValue:)"))); -- (int16_t)decodeShort __attribute__((swift_name("decodeShort()"))); +- (int16_t)decodeShort; - (int16_t)decodeShortElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeShortElement(descriptor:index:)"))); -- (NSString *)decodeString __attribute__((swift_name("decodeString()"))); +- (NSString *)decodeString; - (NSString *)decodeStringElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeStringElement(descriptor:index:)"))); -- (id)decodeValue __attribute__((swift_name("decodeValue()"))); +- (id)decodeValue; - (void)endStructureDescriptor:(id)descriptor __attribute__((swift_name("endStructure(descriptor:)"))); @end @@ -593,13 +593,13 @@ __attribute__((swift_name("StructureKind.OBJECT"))) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (void)encodeNotNullMark __attribute__((swift_name("encodeNotNullMark()"))); +- (void)encodeNotNullMark; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (void)encodeNull __attribute__((swift_name("encodeNull()"))); +- (void)encodeNull; /** * @note annotations @@ -609,7 +609,7 @@ __attribute__((swift_name("StructureKind.OBJECT"))) - (void)encodeSerializableValueSerializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeSerializableValue(serializer:value:)"))); - (void)encodeShortValue:(int16_t)value __attribute__((swift_name("encodeShort(value:)"))); - (void)encodeStringValue:(NSString *)value __attribute__((swift_name("encodeString(value:)"))); -@property (readonly) SerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) SerializersModule *serializersModule; @end @protocol CompositeEncoder @@ -638,7 +638,7 @@ __attribute__((swift_name("StructureKind.OBJECT"))) * kotlinx.serialization.ExperimentalSerializationApi */ - (BOOL)shouldEncodeElementDefaultDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("shouldEncodeElementDefault(descriptor:index:)"))); -@property (readonly) SerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) SerializersModule *serializersModule; @end @@ -647,7 +647,7 @@ __attribute__((swift_name("StructureKind.OBJECT"))) * kotlinx.serialization.ExperimentalSerializationApi */ @interface AbstractEncoder : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); - (void)encodeBooleanValue:(BOOL)value __attribute__((swift_name("encodeBoolean(value:)"))); @@ -668,7 +668,7 @@ __attribute__((swift_name("StructureKind.OBJECT"))) - (void)encodeIntElementDescriptor:(id)descriptor index:(int32_t)index value:(int32_t)value __attribute__((swift_name("encodeIntElement(descriptor:index:value:)"))); - (void)encodeLongValue:(int64_t)value __attribute__((swift_name("encodeLong(value:)"))); - (void)encodeLongElementDescriptor:(id)descriptor index:(int32_t)index value:(int64_t)value __attribute__((swift_name("encodeLongElement(descriptor:index:value:)"))); -- (void)encodeNull __attribute__((swift_name("encodeNull()"))); +- (void)encodeNull; - (void)encodeNullableSerializableElementDescriptor:(id)descriptor index:(int32_t)index serializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeNullableSerializableElement(descriptor:index:serializer:value:)"))); - (void)encodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index serializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeSerializableElement(descriptor:index:serializer:value:)"))); - (void)encodeShortValue:(int16_t)value __attribute__((swift_name("encodeShort(value:)"))); @@ -699,7 +699,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) CompositeDecoderCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) CompositeDecoderCompanion *shared; @property (readonly) int32_t DECODE_DONE __attribute__((swift_name("DECODE_DONE"))); @property (readonly) int32_t UNKNOWN_NAME __attribute__((swift_name("UNKNOWN_NAME"))); @end @@ -714,7 +714,7 @@ __attribute__((objc_subclassing_restricted)) /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ -- (Builder _Nullable)builder __attribute__((swift_name("builder()"))); +- (Builder _Nullable)builder; /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. @@ -769,7 +769,7 @@ __attribute__((objc_subclassing_restricted)) @interface ElementMarker : Base - (instancetype)initWithDescriptor:(id)descriptor readIfAbsent:(Boolean *(^)(id, Int *))readIfAbsent __attribute__((swift_name("init(descriptor:readIfAbsent:)"))) __attribute__((objc_designated_initializer)); - (void)markIndex:(int32_t)index __attribute__((swift_name("mark(index:)"))); -- (int32_t)nextUnmarkedIndex __attribute__((swift_name("nextUnmarkedIndex()"))); +- (int32_t)nextUnmarkedIndex; @end @@ -779,8 +779,8 @@ __attribute__((objc_subclassing_restricted)) */ @protocol GeneratedSerializer @required -- (KotlinArray> *)childSerializers __attribute__((swift_name("childSerializers()"))); -- (KotlinArray> *)typeParametersSerializers __attribute__((swift_name("typeParametersSerializers()"))); +- (KotlinArray> *)childSerializers; +- (KotlinArray> *)typeParametersSerializers; @end @@ -805,9 +805,9 @@ __attribute__((objc_subclassing_restricted)) */ - (void)readElementDecoder:(id)decoder index:(int32_t)index builder:(MutableDictionary *)builder checkIndex:(BOOL)checkIndex __attribute__((swift_name("readElement(decoder:index:builder:checkIndex:)"))); - (void)serializeEncoder:(id)encoder value:(Collection _Nullable)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); -@property (readonly) id keySerializer __attribute__((swift_name("keySerializer"))); -@property (readonly) id valueSerializer __attribute__((swift_name("valueSerializer"))); +@property (readonly) id descriptor; +@property (readonly) id keySerializer; +@property (readonly) id valueSerializer; @end @@ -816,7 +816,7 @@ __attribute__((objc_subclassing_restricted)) * kotlinx.serialization.InternalSerializationApi */ @interface TaggedDecoder : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); @@ -824,25 +824,25 @@ __attribute__((objc_subclassing_restricted)) * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ - (void)doCopyTagsToOther:(TaggedDecoder *)other __attribute__((swift_name("doCopyTagsTo(other:)"))); -- (BOOL)decodeBoolean __attribute__((swift_name("decodeBoolean()"))); +- (BOOL)decodeBoolean; - (BOOL)decodeBooleanElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeBooleanElement(descriptor:index:)"))); -- (int8_t)decodeByte __attribute__((swift_name("decodeByte()"))); +- (int8_t)decodeByte; - (int8_t)decodeByteElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeByteElement(descriptor:index:)"))); -- (unichar)decodeChar __attribute__((swift_name("decodeChar()"))); +- (unichar)decodeChar; - (unichar)decodeCharElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeCharElement(descriptor:index:)"))); -- (double)decodeDouble __attribute__((swift_name("decodeDouble()"))); +- (double)decodeDouble; - (double)decodeDoubleElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeDoubleElement(descriptor:index:)"))); - (int32_t)decodeEnumEnumDescriptor:(id)enumDescriptor __attribute__((swift_name("decodeEnum(enumDescriptor:)"))); -- (float)decodeFloat __attribute__((swift_name("decodeFloat()"))); +- (float)decodeFloat; - (float)decodeFloatElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeFloatElement(descriptor:index:)"))); - (id)decodeInlineDescriptor:(id)descriptor __attribute__((swift_name("decodeInline(descriptor:)"))); - (id)decodeInlineElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeInlineElement(descriptor:index:)"))); -- (int32_t)decodeInt __attribute__((swift_name("decodeInt()"))); +- (int32_t)decodeInt; - (int32_t)decodeIntElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeIntElement(descriptor:index:)"))); -- (int64_t)decodeLong __attribute__((swift_name("decodeLong()"))); +- (int64_t)decodeLong; - (int64_t)decodeLongElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeLongElement(descriptor:index:)"))); -- (BOOL)decodeNotNullMark __attribute__((swift_name("decodeNotNullMark()"))); -- (KotlinNothing * _Nullable)decodeNull __attribute__((swift_name("decodeNull()"))); +- (BOOL)decodeNotNullMark; +- (KotlinNothing * _Nullable)decodeNull; - (id _Nullable)decodeNullableSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeNullableSerializableElement(descriptor:index:deserializer:previousValue:)"))); - (id _Nullable)decodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeSerializableElement(descriptor:index:deserializer:previousValue:)"))); @@ -850,9 +850,9 @@ __attribute__((objc_subclassing_restricted)) * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ - (id _Nullable)decodeSerializableValueDeserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeSerializableValue(deserializer:previousValue:)"))); -- (int16_t)decodeShort __attribute__((swift_name("decodeShort()"))); +- (int16_t)decodeShort; - (int16_t)decodeShortElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeShortElement(descriptor:index:)"))); -- (NSString *)decodeString __attribute__((swift_name("decodeString()"))); +- (NSString *)decodeString; - (NSString *)decodeStringElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeStringElement(descriptor:index:)"))); /** @@ -934,7 +934,7 @@ __attribute__((objc_subclassing_restricted)) /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ -- (Tag _Nullable)popTag __attribute__((swift_name("popTag()"))); +- (Tag _Nullable)popTag; /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. @@ -944,13 +944,13 @@ __attribute__((objc_subclassing_restricted)) /** * @note This property has protected visibility in Kotlin source and is intended only for use by subclasses. */ -@property (readonly) Tag _Nullable currentTag __attribute__((swift_name("currentTag"))); +@property (readonly) Tag _Nullable currentTag; /** * @note This property has protected visibility in Kotlin source and is intended only for use by subclasses. */ -@property (readonly) Tag _Nullable currentTagOrNull __attribute__((swift_name("currentTagOrNull"))); -@property (readonly) SerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) Tag _Nullable currentTagOrNull; +@property (readonly) SerializersModule *serializersModule; @end @@ -959,7 +959,7 @@ __attribute__((objc_subclassing_restricted)) * kotlinx.serialization.InternalSerializationApi */ @interface NamedValueDecoder : TaggedDecoder -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** @@ -989,7 +989,7 @@ __attribute__((objc_subclassing_restricted)) * kotlinx.serialization.InternalSerializationApi */ @interface TaggedEncoder : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); - (void)encodeBooleanValue:(BOOL)value __attribute__((swift_name("encodeBoolean(value:)"))); @@ -1009,8 +1009,8 @@ __attribute__((objc_subclassing_restricted)) - (void)encodeIntElementDescriptor:(id)descriptor index:(int32_t)index value:(int32_t)value __attribute__((swift_name("encodeIntElement(descriptor:index:value:)"))); - (void)encodeLongValue:(int64_t)value __attribute__((swift_name("encodeLong(value:)"))); - (void)encodeLongElementDescriptor:(id)descriptor index:(int32_t)index value:(int64_t)value __attribute__((swift_name("encodeLongElement(descriptor:index:value:)"))); -- (void)encodeNotNullMark __attribute__((swift_name("encodeNotNullMark()"))); -- (void)encodeNull __attribute__((swift_name("encodeNull()"))); +- (void)encodeNotNullMark; +- (void)encodeNull; - (void)encodeNullableSerializableElementDescriptor:(id)descriptor index:(int32_t)index serializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeNullableSerializableElement(descriptor:index:serializer:value:)"))); - (void)encodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index serializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeSerializableElement(descriptor:index:serializer:value:)"))); - (void)encodeShortValue:(int16_t)value __attribute__((swift_name("encodeShort(value:)"))); @@ -1102,7 +1102,7 @@ __attribute__((objc_subclassing_restricted)) /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ -- (Tag _Nullable)popTag __attribute__((swift_name("popTag()"))); +- (Tag _Nullable)popTag; /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. @@ -1112,13 +1112,13 @@ __attribute__((objc_subclassing_restricted)) /** * @note This property has protected visibility in Kotlin source and is intended only for use by subclasses. */ -@property (readonly) Tag _Nullable currentTag __attribute__((swift_name("currentTag"))); +@property (readonly) Tag _Nullable currentTag; /** * @note This property has protected visibility in Kotlin source and is intended only for use by subclasses. */ -@property (readonly) Tag _Nullable currentTagOrNull __attribute__((swift_name("currentTagOrNull"))); -@property (readonly) SerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) Tag _Nullable currentTagOrNull; +@property (readonly) SerializersModule *serializersModule; @end @@ -1127,7 +1127,7 @@ __attribute__((objc_subclassing_restricted)) * kotlinx.serialization.InternalSerializationApi */ @interface NamedValueEncoder : TaggedEncoder -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** @@ -1221,7 +1221,7 @@ __attribute__((swift_name("KotlinBoolean.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinBooleanCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinBooleanCompanion *shared; @end __attribute__((objc_subclassing_restricted)) @@ -1230,7 +1230,7 @@ __attribute__((swift_name("KotlinByte.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinByteCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinByteCompanion *shared; @property (readonly) int8_t MAX_VALUE __attribute__((swift_name("MAX_VALUE"))); @property (readonly) int8_t MIN_VALUE __attribute__((swift_name("MIN_VALUE"))); @@ -1253,7 +1253,7 @@ __attribute__((swift_name("KotlinChar.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinCharCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinCharCompanion *shared; /** * @note annotations @@ -1322,7 +1322,7 @@ __attribute__((swift_name("KotlinDouble.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinDoubleCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinDoubleCompanion *shared; @property (readonly) double MAX_VALUE __attribute__((swift_name("MAX_VALUE"))); @property (readonly) double MIN_VALUE __attribute__((swift_name("MIN_VALUE"))); @property (readonly) double NEGATIVE_INFINITY __attribute__((swift_name("NEGATIVE_INFINITY"))); @@ -1348,7 +1348,7 @@ __attribute__((swift_name("KotlinFloat.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinFloatCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinFloatCompanion *shared; @property (readonly) float MAX_VALUE __attribute__((swift_name("MAX_VALUE"))); @property (readonly) float MIN_VALUE __attribute__((swift_name("MIN_VALUE"))); @property (readonly) float NEGATIVE_INFINITY __attribute__((swift_name("NEGATIVE_INFINITY"))); @@ -1374,7 +1374,7 @@ __attribute__((swift_name("KotlinInt.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinIntCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinIntCompanion *shared; @property (readonly) int32_t MAX_VALUE __attribute__((swift_name("MAX_VALUE"))); @property (readonly) int32_t MIN_VALUE __attribute__((swift_name("MIN_VALUE"))); @@ -1397,7 +1397,7 @@ __attribute__((swift_name("KotlinLong.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinLongCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinLongCompanion *shared; @property (readonly) int64_t MAX_VALUE __attribute__((swift_name("MAX_VALUE"))); @property (readonly) int64_t MIN_VALUE __attribute__((swift_name("MIN_VALUE"))); @@ -1420,7 +1420,7 @@ __attribute__((swift_name("KotlinShort.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinShortCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinShortCompanion *shared; @property (readonly) int16_t MAX_VALUE __attribute__((swift_name("MAX_VALUE"))); @property (readonly) int16_t MIN_VALUE __attribute__((swift_name("MIN_VALUE"))); @@ -1443,7 +1443,7 @@ __attribute__((swift_name("KotlinString.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinStringCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinStringCompanion *shared; @end __attribute__((objc_subclassing_restricted)) @@ -1452,7 +1452,7 @@ __attribute__((swift_name("KotlinUByte.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinUByteCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinUByteCompanion *shared; @property (readonly) uint8_t MAX_VALUE __attribute__((swift_name("MAX_VALUE"))); @property (readonly) uint8_t MIN_VALUE __attribute__((swift_name("MIN_VALUE"))); @property (readonly) int32_t SIZE_BITS __attribute__((swift_name("SIZE_BITS"))); @@ -1465,7 +1465,7 @@ __attribute__((swift_name("KotlinUInt.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinUIntCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinUIntCompanion *shared; @property (readonly) uint32_t MAX_VALUE __attribute__((swift_name("MAX_VALUE"))); @property (readonly) uint32_t MIN_VALUE __attribute__((swift_name("MIN_VALUE"))); @property (readonly) int32_t SIZE_BITS __attribute__((swift_name("SIZE_BITS"))); @@ -1478,7 +1478,7 @@ __attribute__((swift_name("KotlinULong.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinULongCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinULongCompanion *shared; @property (readonly) uint64_t MAX_VALUE __attribute__((swift_name("MAX_VALUE"))); @property (readonly) uint64_t MIN_VALUE __attribute__((swift_name("MIN_VALUE"))); @property (readonly) int32_t SIZE_BITS __attribute__((swift_name("SIZE_BITS"))); @@ -1491,7 +1491,7 @@ __attribute__((swift_name("KotlinUShort.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinUShortCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinUShortCompanion *shared; @property (readonly) uint16_t MAX_VALUE __attribute__((swift_name("MAX_VALUE"))); @property (readonly) uint16_t MIN_VALUE __attribute__((swift_name("MIN_VALUE"))); @property (readonly) int32_t SIZE_BITS __attribute__((swift_name("SIZE_BITS"))); @@ -1503,8 +1503,8 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)unit __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinUnit *shared __attribute__((swift_name("shared"))); -- (NSString *)description __attribute__((swift_name("description()"))); +@property (class, readonly, getter=shared) KotlinUnit *shared; +- (NSString *)description; @end __attribute__((objc_subclassing_restricted)) @@ -1513,7 +1513,7 @@ __attribute__((swift_name("KotlinDuration.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinDurationCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinDurationCompanion *shared; - (int64_t)days:(double)receiver __attribute__((swift_name("days(_:)"))); - (int64_t)days_:(int32_t)receiver __attribute__((swift_name("days(__:)"))); - (int64_t)days__:(int64_t)receiver __attribute__((swift_name("days(___:)"))); @@ -1690,7 +1690,7 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -+ (id)listSerialDescriptor __attribute__((swift_name("listSerialDescriptor()"))); ++ (id)listSerialDescriptor; /** * @note annotations @@ -1702,21 +1702,21 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -+ (id)mapSerialDescriptor __attribute__((swift_name("mapSerialDescriptor()"))); ++ (id)mapSerialDescriptor; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ + (id)mapSerialDescriptorKeyDescriptor:(id)keyDescriptor valueDescriptor:(id)valueDescriptor __attribute__((swift_name("mapSerialDescriptor(keyDescriptor:valueDescriptor:)"))); -+ (id)serialDescriptor __attribute__((swift_name("serialDescriptor()"))); ++ (id)serialDescriptor; + (id)serialDescriptorType:(id)type __attribute__((swift_name("serialDescriptor(type:)"))); /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -+ (id)setSerialDescriptor __attribute__((swift_name("setSerialDescriptor()"))); ++ (id)setSerialDescriptor; /** * @note annotations @@ -1739,7 +1739,7 @@ __attribute__((objc_subclassing_restricted)) __attribute__((objc_subclassing_restricted)) @interface SerializersKt : Base -+ (id)serializer __attribute__((swift_name("serializer()"))); ++ (id)serializer; /** * @note annotations @@ -1782,9 +1782,9 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (int8_t)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (KotlinByteIterator *)iterator __attribute__((swift_name("iterator()"))); +- (KotlinByteIterator *)iterator; - (void)setIndex:(int32_t)index value:(int8_t)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinKDeclarationContainer @@ -1812,8 +1812,8 @@ __attribute__((objc_subclassing_restricted)) * kotlin.SinceKotlin(version="1.1") */ - (BOOL)isInstanceValue:(id _Nullable)value __attribute__((swift_name("isInstance(value:)"))); -@property (readonly) NSString * _Nullable qualifiedName __attribute__((swift_name("qualifiedName"))); -@property (readonly) NSString * _Nullable simpleName __attribute__((swift_name("simpleName"))); +@property (readonly) NSString * _Nullable qualifiedName; +@property (readonly) NSString * _Nullable simpleName; @end __attribute__((objc_subclassing_restricted)) @@ -1822,9 +1822,9 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinAnnotation @@ -1837,14 +1837,14 @@ __attribute__((objc_subclassing_restricted)) @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end @protocol KotlinMapEntry @required -@property (readonly) id _Nullable key __attribute__((swift_name("key"))); -@property (readonly) id _Nullable value __attribute__((swift_name("value"))); +@property (readonly) id _Nullable key; +@property (readonly) id _Nullable value; @end @protocol KotlinComparable @@ -1854,13 +1854,13 @@ __attribute__((objc_subclassing_restricted)) @interface KotlinEnum : Base - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) KotlinEnumCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) KotlinEnumCompanion *companion; - (int32_t)compareToOther:(E)other __attribute__((swift_name("compareTo(other:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@property (readonly) int32_t ordinal __attribute__((swift_name("ordinal"))); +- (NSUInteger)hash; +- (NSString *)description; +@property (readonly) NSString *name; +@property (readonly) int32_t ordinal; @end @@ -1873,15 +1873,15 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) KotlinDurationUnit *nanoseconds __attribute__((swift_name("nanoseconds"))); -@property (class, readonly) KotlinDurationUnit *microseconds __attribute__((swift_name("microseconds"))); -@property (class, readonly) KotlinDurationUnit *milliseconds __attribute__((swift_name("milliseconds"))); -@property (class, readonly) KotlinDurationUnit *seconds __attribute__((swift_name("seconds"))); -@property (class, readonly) KotlinDurationUnit *minutes __attribute__((swift_name("minutes"))); -@property (class, readonly) KotlinDurationUnit *hours __attribute__((swift_name("hours"))); -@property (class, readonly) KotlinDurationUnit *days __attribute__((swift_name("days"))); -+ (KotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@property (class, readonly) KotlinDurationUnit *nanoseconds; +@property (class, readonly) KotlinDurationUnit *microseconds; +@property (class, readonly) KotlinDurationUnit *milliseconds; +@property (class, readonly) KotlinDurationUnit *seconds; +@property (class, readonly) KotlinDurationUnit *minutes; +@property (class, readonly) KotlinDurationUnit *hours; +@property (class, readonly) KotlinDurationUnit *days; ++ (KotlinArray *)values; +@property (class, readonly) NSArray *entries; @end @protocol KotlinKType @@ -1891,14 +1891,14 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlin.SinceKotlin(version="1.1") */ -@property (readonly) NSArray *arguments __attribute__((swift_name("arguments"))); +@property (readonly) NSArray *arguments; /** * @note annotations * kotlin.SinceKotlin(version="1.1") */ -@property (readonly) id _Nullable classifier __attribute__((swift_name("classifier"))); -@property (readonly) BOOL isMarkedNullable __attribute__((swift_name("isMarkedNullable"))); +@property (readonly) id _Nullable classifier; +@property (readonly) BOOL isMarkedNullable; @end __attribute__((objc_subclassing_restricted)) @@ -1908,16 +1908,16 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (int32_t)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (KotlinIntIterator *)iterator __attribute__((swift_name("iterator()"))); +- (KotlinIntIterator *)iterator; - (void)setIndex:(int32_t)index value:(int32_t)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @interface KotlinByteIterator : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (Byte *)next __attribute__((swift_name("next()"))); -- (int8_t)nextByte __attribute__((swift_name("nextByte()"))); +- (Byte *)next; +- (int8_t)nextByte; @end __attribute__((objc_subclassing_restricted)) @@ -1925,7 +1925,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinEnumCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinEnumCompanion *shared; @end @@ -1936,20 +1936,20 @@ __attribute__((objc_subclassing_restricted)) __attribute__((objc_subclassing_restricted)) @interface KotlinKTypeProjection : Base - (instancetype)initWithVariance:(KotlinKVariance * _Nullable)variance type:(id _Nullable)type __attribute__((swift_name("init(variance:type:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) KotlinKTypeProjectionCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) KotlinKTypeProjectionCompanion *companion; - (KotlinKTypeProjection *)doCopyVariance:(KotlinKVariance * _Nullable)variance type:(id _Nullable)type __attribute__((swift_name("doCopy(variance:type:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) id _Nullable type __attribute__((swift_name("type"))); -@property (readonly) KotlinKVariance * _Nullable variance __attribute__((swift_name("variance"))); +- (NSUInteger)hash; +- (NSString *)description; +@property (readonly) id _Nullable type; +@property (readonly) KotlinKVariance * _Nullable variance; @end @interface KotlinIntIterator : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (Int *)next __attribute__((swift_name("next()"))); -- (int32_t)nextInt __attribute__((swift_name("nextInt()"))); +- (Int *)next; +- (int32_t)nextInt; @end @@ -1962,11 +1962,11 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) KotlinKVariance *invariant __attribute__((swift_name("invariant"))); -@property (class, readonly) KotlinKVariance *in __attribute__((swift_name("in"))); -@property (class, readonly) KotlinKVariance *out __attribute__((swift_name("out"))); -+ (KotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@property (class, readonly) KotlinKVariance *invariant; +@property (class, readonly) KotlinKVariance *in; +@property (class, readonly) KotlinKVariance *out; ++ (KotlinArray *)values; +@property (class, readonly) NSArray *entries; @end __attribute__((objc_subclassing_restricted)) @@ -1975,7 +1975,7 @@ __attribute__((swift_name("KotlinKTypeProjection.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinKTypeProjectionCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinKTypeProjectionCompanion *shared; - (KotlinKTypeProjection *)contravariantType:(id)type __attribute__((swift_name("contravariant(type:)"))); - (KotlinKTypeProjection *)covariantType:(id)type __attribute__((swift_name("covariant(type:)"))); - (KotlinKTypeProjection *)invariantType:(id)type __attribute__((swift_name("invariant(type:)"))); @@ -2002,63 +2002,63 @@ __attribute__((swift_name("KotlinKTypeProjection.Companion"))) @end @interface KotlinBooleanCompanion (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface KotlinByteCompanion (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface KotlinCharCompanion (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface KotlinDoubleCompanion (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface KotlinDurationCompanion (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface KotlinFloatCompanion (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface KotlinIntCompanion (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface KotlinLongCompanion (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface KotlinShortCompanion (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface KotlinStringCompanion (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface KotlinUByteCompanion (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface KotlinUIntCompanion (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface KotlinULongCompanion (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface KotlinUShortCompanion (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface KotlinUnit (Extensions) -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; @end @interface PolymorphicModuleBuilder (Extensions) @@ -2081,7 +2081,7 @@ __attribute__((swift_name("KotlinKTypeProjection.Companion"))) - (NSArray> *)getPolymorphicDescriptorsDescriptor:(id)descriptor __attribute__((swift_name("getPolymorphicDescriptors(descriptor:)"))); - (SerializersModule *)overwriteWithOther:(SerializersModule *)other __attribute__((swift_name("overwriteWith(other:)"))); - (SerializersModule *)plusOther:(SerializersModule *)other __attribute__((swift_name("plus(other:)"))); -- (id)serializer __attribute__((swift_name("serializer()"))); +- (id)serializer; - (id)serializerType:(id)type __attribute__((swift_name("serializer(type:)"))); /** diff --git a/native/objcexport-header-generator/testData/dependencies/kotlinxSerializationJson/!kotlinxSerializationJson.h b/native/objcexport-header-generator/testData/dependencies/kotlinxSerializationJson/!kotlinxSerializationJson.h index 82762ad714f09..712d1040b0eab 100644 --- a/native/objcexport-header-generator/testData/dependencies/kotlinxSerializationJson/!kotlinxSerializationJson.h +++ b/native/objcexport-header-generator/testData/dependencies/kotlinxSerializationJson/!kotlinxSerializationJson.h @@ -29,13 +29,13 @@ NS_ASSUME_NONNULL_BEGIN @interface KotlinEnum : Base - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) KotlinEnumCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) KotlinEnumCompanion *companion; - (int32_t)compareToOther:(E)other __attribute__((swift_name("compareTo(other:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@property (readonly) int32_t ordinal __attribute__((swift_name("ordinal"))); +- (NSUInteger)hash; +- (NSString *)description; +@property (readonly) NSString *name; +@property (readonly) int32_t ordinal; @end __attribute__((objc_subclassing_restricted)) @@ -43,11 +43,11 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) ClassDiscriminatorMode *none __attribute__((swift_name("none"))); -@property (class, readonly) ClassDiscriminatorMode *allJsonObjects __attribute__((swift_name("allJsonObjects"))); -@property (class, readonly) ClassDiscriminatorMode *polymorphic __attribute__((swift_name("polymorphic"))); -+ (KotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@property (class, readonly) ClassDiscriminatorMode *none; +@property (class, readonly) ClassDiscriminatorMode *allJsonObjects; +@property (class, readonly) ClassDiscriminatorMode *polymorphic; ++ (KotlinArray *)values; +@property (class, readonly) NSArray *entries; @end __attribute__((objc_subclassing_restricted)) @@ -55,11 +55,11 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) DecodeSequenceMode *whitespaceSeparated __attribute__((swift_name("whitespaceSeparated"))); -@property (class, readonly) DecodeSequenceMode *arrayWrapped __attribute__((swift_name("arrayWrapped"))); -@property (class, readonly) DecodeSequenceMode *autoDetect __attribute__((swift_name("autoDetect"))); -+ (KotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@property (class, readonly) DecodeSequenceMode *whitespaceSeparated; +@property (class, readonly) DecodeSequenceMode *arrayWrapped; +@property (class, readonly) DecodeSequenceMode *autoDetect; ++ (KotlinArray *)values; +@property (class, readonly) NSArray *entries; @end __attribute__((objc_subclassing_restricted)) @@ -67,15 +67,15 @@ __attribute__((objc_subclassing_restricted)) @end @interface Json : StringFormat -@property (class, readonly, getter=companion) JsonDefault *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) JsonDefault *companion; - (id _Nullable)decodeFromJsonElementDeserializer:(DeserializationStrategy *)deserializer element:(JsonElement *)element __attribute__((swift_name("decodeFromJsonElement(deserializer:element:)"))); - (id _Nullable)decodeFromStringString:(NSString *)string __attribute__((swift_name("decodeFromString(string:)"))); - (id _Nullable)decodeFromStringDeserializer:(DeserializationStrategy *)deserializer string:(NSString *)string __attribute__((swift_name("decodeFromString(deserializer:string:)"))); - (JsonElement *)encodeToJsonElementSerializer:(SerializationStrategy *)serializer value:(id _Nullable)value __attribute__((swift_name("encodeToJsonElement(serializer:value:)"))); - (NSString *)encodeToStringSerializer:(SerializationStrategy *)serializer value:(id _Nullable)value __attribute__((swift_name("encodeToString(serializer:value:)"))); - (JsonElement *)parseToJsonElementString:(NSString *)string __attribute__((swift_name("parseToJsonElement(string:)"))); -@property (readonly) JsonConfiguration *configuration __attribute__((swift_name("configuration"))); -@property (readonly) SerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) JsonConfiguration *configuration; +@property (readonly) SerializersModule *serializersModule; @end __attribute__((objc_subclassing_restricted)) @@ -84,7 +84,7 @@ __attribute__((swift_name("Json.Default"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)default_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) JsonDefault *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) JsonDefault *shared; @end __attribute__((unavailable("can't be imported"))) @@ -99,44 +99,44 @@ __attribute__((objc_subclassing_restricted)) __attribute__((objc_subclassing_restricted)) @interface JsonBuilder : Base -@property BOOL allowSpecialFloatingPointValues __attribute__((swift_name("allowSpecialFloatingPointValues"))); -@property BOOL allowStructuredMapKeys __attribute__((swift_name("allowStructuredMapKeys"))); -@property BOOL allowTrailingComma __attribute__((swift_name("allowTrailingComma"))); -@property NSString *classDiscriminator __attribute__((swift_name("classDiscriminator"))); -@property ClassDiscriminatorMode *classDiscriminatorMode __attribute__((swift_name("classDiscriminatorMode"))); -@property BOOL coerceInputValues __attribute__((swift_name("coerceInputValues"))); -@property BOOL decodeEnumsCaseInsensitive __attribute__((swift_name("decodeEnumsCaseInsensitive"))); -@property BOOL encodeDefaults __attribute__((swift_name("encodeDefaults"))); -@property BOOL explicitNulls __attribute__((swift_name("explicitNulls"))); -@property BOOL ignoreUnknownKeys __attribute__((swift_name("ignoreUnknownKeys"))); -@property BOOL isLenient __attribute__((swift_name("isLenient"))); -@property id _Nullable namingStrategy __attribute__((swift_name("namingStrategy"))); -@property BOOL prettyPrint __attribute__((swift_name("prettyPrint"))); -@property NSString *prettyPrintIndent __attribute__((swift_name("prettyPrintIndent"))); -@property SerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); -@property BOOL useAlternativeNames __attribute__((swift_name("useAlternativeNames"))); -@property BOOL useArrayPolymorphism __attribute__((swift_name("useArrayPolymorphism"))); +@property BOOL allowSpecialFloatingPointValues; +@property BOOL allowStructuredMapKeys; +@property BOOL allowTrailingComma; +@property NSString *classDiscriminator; +@property ClassDiscriminatorMode *classDiscriminatorMode; +@property BOOL coerceInputValues; +@property BOOL decodeEnumsCaseInsensitive; +@property BOOL encodeDefaults; +@property BOOL explicitNulls; +@property BOOL ignoreUnknownKeys; +@property BOOL isLenient; +@property id _Nullable namingStrategy; +@property BOOL prettyPrint; +@property NSString *prettyPrintIndent; +@property SerializersModule *serializersModule; +@property BOOL useAlternativeNames; +@property BOOL useArrayPolymorphism; @end __attribute__((objc_subclassing_restricted)) @interface JsonConfiguration : Base -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) BOOL allowSpecialFloatingPointValues __attribute__((swift_name("allowSpecialFloatingPointValues"))); -@property (readonly) BOOL allowStructuredMapKeys __attribute__((swift_name("allowStructuredMapKeys"))); -@property (readonly) BOOL allowTrailingComma __attribute__((swift_name("allowTrailingComma"))); -@property (readonly) NSString *classDiscriminator __attribute__((swift_name("classDiscriminator"))); -@property ClassDiscriminatorMode *classDiscriminatorMode __attribute__((swift_name("classDiscriminatorMode"))); -@property (readonly) BOOL coerceInputValues __attribute__((swift_name("coerceInputValues"))); -@property (readonly) BOOL decodeEnumsCaseInsensitive __attribute__((swift_name("decodeEnumsCaseInsensitive"))); -@property (readonly) BOOL encodeDefaults __attribute__((swift_name("encodeDefaults"))); -@property (readonly) BOOL explicitNulls __attribute__((swift_name("explicitNulls"))); -@property (readonly) BOOL ignoreUnknownKeys __attribute__((swift_name("ignoreUnknownKeys"))); -@property (readonly) BOOL isLenient __attribute__((swift_name("isLenient"))); -@property (readonly) id _Nullable namingStrategy __attribute__((swift_name("namingStrategy"))); -@property (readonly) BOOL prettyPrint __attribute__((swift_name("prettyPrint"))); -@property (readonly) NSString *prettyPrintIndent __attribute__((swift_name("prettyPrintIndent"))); -@property (readonly) BOOL useAlternativeNames __attribute__((swift_name("useAlternativeNames"))); -@property (readonly) BOOL useArrayPolymorphism __attribute__((swift_name("useArrayPolymorphism"))); +- (NSString *)description; +@property (readonly) BOOL allowSpecialFloatingPointValues; +@property (readonly) BOOL allowStructuredMapKeys; +@property (readonly) BOOL allowTrailingComma; +@property (readonly) NSString *classDiscriminator; +@property ClassDiscriminatorMode *classDiscriminatorMode; +@property (readonly) BOOL coerceInputValues; +@property (readonly) BOOL decodeEnumsCaseInsensitive; +@property (readonly) BOOL encodeDefaults; +@property (readonly) BOOL explicitNulls; +@property (readonly) BOOL ignoreUnknownKeys; +@property (readonly) BOOL isLenient; +@property (readonly) id _Nullable namingStrategy; +@property (readonly) BOOL prettyPrint; +@property (readonly) NSString *prettyPrintIndent; +@property (readonly) BOOL useAlternativeNames; +@property (readonly) BOOL useArrayPolymorphism; @end __attribute__((objc_subclassing_restricted)) @@ -152,17 +152,17 @@ __attribute__((objc_subclassing_restricted)) */ - (DeserializationStrategy *)selectDeserializerElement:(JsonElement *)element __attribute__((swift_name("selectDeserializer(element:)"))); - (void)serializeEncoder:(Encoder *)encoder value:(T)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end @protocol JsonDecoder @required -- (JsonElement *)decodeJsonElement __attribute__((swift_name("decodeJsonElement()"))); -@property (readonly) Json *json __attribute__((swift_name("json"))); +- (JsonElement *)decodeJsonElement; +@property (readonly) Json *json; @end @interface JsonElement : Base -@property (class, readonly, getter=companion) JsonElementCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) JsonElementCompanion *companion; @end __attribute__((objc_subclassing_restricted)) @@ -171,14 +171,14 @@ __attribute__((swift_name("JsonElement.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) JsonElementCompanion *shared __attribute__((swift_name("shared"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +@property (class, readonly, getter=shared) JsonElementCompanion *shared; +- (KSerializer *)serializer; @end @protocol JsonEncoder @required - (void)encodeJsonElementElement:(JsonElement *)element __attribute__((swift_name("encodeJsonElement(element:)"))); -@property (readonly) Json *json __attribute__((swift_name("json"))); +@property (readonly) Json *json; @end @protocol JsonNamingStrategy @@ -191,16 +191,16 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)builtins __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) JsonNamingStrategyBuiltins *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) JsonNamingStrategyBuiltins *shared; @property (readonly) id KebabCase __attribute__((swift_name("KebabCase"))); @property (readonly) id SnakeCase __attribute__((swift_name("SnakeCase"))); @end @interface JsonPrimitive : JsonElement -@property (class, readonly, getter=companion) JsonPrimitiveCompanion *companion __attribute__((swift_name("companion"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *content __attribute__((swift_name("content"))); -@property (readonly) BOOL isString __attribute__((swift_name("isString"))); +@property (class, readonly, getter=companion) JsonPrimitiveCompanion *companion; +- (NSString *)description; +@property (readonly) NSString *content; +@property (readonly) BOOL isString; @end __attribute__((objc_subclassing_restricted)) @@ -208,11 +208,11 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)jsonNull __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) JsonNull *shared __attribute__((swift_name("shared"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +@property (class, readonly, getter=shared) JsonNull *shared; +- (KSerializer *)serializer; - (KSerializer *)serializerTypeParamsSerializers:(KotlinArray *> *)typeParamsSerializers __attribute__((swift_name("serializer(typeParamsSerializers:)"))); -@property (readonly) NSString *content __attribute__((swift_name("content"))); -@property (readonly) BOOL isString __attribute__((swift_name("isString"))); +@property (readonly) NSString *content; +@property (readonly) BOOL isString; @end __attribute__((unavailable("can't be imported"))) @@ -230,8 +230,8 @@ __attribute__((swift_name("JsonPrimitive.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) JsonPrimitiveCompanion *shared __attribute__((swift_name("shared"))); -- (KSerializer *)serializer __attribute__((swift_name("serializer()"))); +@property (class, readonly, getter=shared) JsonPrimitiveCompanion *shared; +- (KSerializer *)serializer; @end @interface JsonTransformingSerializer : KSerializer @@ -248,7 +248,7 @@ __attribute__((swift_name("JsonPrimitive.Companion"))) * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ - (JsonElement *)transformSerializeElement:(JsonElement *)element __attribute__((swift_name("transformSerialize(element:)"))); -@property (readonly) SerialDescriptor *descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) SerialDescriptor *descriptor; @end @protocol InternalJsonReader @@ -317,7 +317,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinEnumCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinEnumCompanion *shared; @end __attribute__((objc_subclassing_restricted)) @@ -326,9 +326,9 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end __attribute__((objc_subclassing_restricted)) @@ -368,8 +368,8 @@ __attribute__((objc_subclassing_restricted)) * kotlin.SinceKotlin(version="1.1") */ - (BOOL)isInstanceValue:(id _Nullable)value __attribute__((swift_name("isInstance(value:)"))); -@property (readonly) NSString * _Nullable qualifiedName __attribute__((swift_name("qualifiedName"))); -@property (readonly) NSString * _Nullable simpleName __attribute__((swift_name("simpleName"))); +@property (readonly) NSString * _Nullable qualifiedName; +@property (readonly) NSString * _Nullable simpleName; @end __attribute__((objc_subclassing_restricted)) @@ -391,9 +391,9 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (unichar)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (KotlinCharIterator *)iterator __attribute__((swift_name("iterator()"))); +- (KotlinCharIterator *)iterator; - (void)setIndex:(int32_t)index value:(unichar)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end __attribute__((objc_subclassing_restricted)) @@ -402,20 +402,20 @@ __attribute__((objc_subclassing_restricted)) @protocol KotlinSequence @required -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end @interface KotlinCharIterator : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (id)next __attribute__((swift_name("next()"))); -- (unichar)nextChar __attribute__((swift_name("nextChar()"))); +- (id)next; +- (unichar)nextChar; @end @interface Json (Extensions) @@ -451,10 +451,10 @@ __attribute__((objc_subclassing_restricted)) @end @interface JsonElement (Extensions) -@property (readonly) NSArray *jsonArray __attribute__((swift_name("jsonArray"))); -@property (readonly) JsonNull *jsonNull __attribute__((swift_name("jsonNull"))); -@property (readonly) NSDictionary *jsonObject __attribute__((swift_name("jsonObject"))); -@property (readonly) JsonPrimitive *jsonPrimitive __attribute__((swift_name("jsonPrimitive"))); +@property (readonly) NSArray *jsonArray; +@property (readonly) JsonNull *jsonNull; +@property (readonly) NSDictionary *jsonObject; +@property (readonly) JsonPrimitive *jsonPrimitive; @end @interface JsonObjectBuilder (Extensions) @@ -467,17 +467,17 @@ __attribute__((objc_subclassing_restricted)) @end @interface JsonPrimitive (Extensions) -@property (readonly) BOOL boolean __attribute__((swift_name("boolean"))); -@property (readonly) Boolean * _Nullable booleanOrNull __attribute__((swift_name("booleanOrNull"))); -@property (readonly) NSString * _Nullable contentOrNull __attribute__((swift_name("contentOrNull"))); -@property (readonly, getter=double) double double_ __attribute__((swift_name("double_"))); -@property (readonly) Double * _Nullable doubleOrNull __attribute__((swift_name("doubleOrNull"))); -@property (readonly, getter=float) float float_ __attribute__((swift_name("float_"))); -@property (readonly) Float * _Nullable floatOrNull __attribute__((swift_name("floatOrNull"))); -@property (readonly, getter=int) int32_t int_ __attribute__((swift_name("int_"))); -@property (readonly) Int * _Nullable intOrNull __attribute__((swift_name("intOrNull"))); -@property (readonly, getter=long) int64_t long_ __attribute__((swift_name("long_"))); -@property (readonly) Long * _Nullable longOrNull __attribute__((swift_name("longOrNull"))); +@property (readonly) BOOL boolean; +@property (readonly) Boolean * _Nullable booleanOrNull; +@property (readonly) NSString * _Nullable contentOrNull; +@property (readonly, getter=double) double double_; +@property (readonly) Double * _Nullable doubleOrNull; +@property (readonly, getter=float) float float_; +@property (readonly) Float * _Nullable floatOrNull; +@property (readonly, getter=int) int32_t int_; +@property (readonly) Int * _Nullable intOrNull; +@property (readonly, getter=long) int64_t long_; +@property (readonly) Long * _Nullable longOrNull; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/mapLikeSerializer/!mapLikeSerializer.h b/native/objcexport-header-generator/testData/dependencies/mapLikeSerializer/!mapLikeSerializer.h index 42c77b2629d58..72b8456e5bbf1 100644 --- a/native/objcexport-header-generator/testData/dependencies/mapLikeSerializer/!mapLikeSerializer.h +++ b/native/objcexport-header-generator/testData/dependencies/mapLikeSerializer/!mapLikeSerializer.h @@ -24,19 +24,19 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) Kotlinx_serialization_coreMapLikeSerializer *> * _Nullable foo __attribute__((swift_name("foo"))); +@property (class, readonly) Kotlinx_serialization_coreMapLikeSerializer *> * _Nullable foo; @end @protocol Kotlinx_serialization_coreSerializationStrategy @required - (void)serializeEncoder:(id)encoder value:(id _Nullable)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) id descriptor; @end @protocol Kotlinx_serialization_coreDeserializationStrategy @required - (id _Nullable)deserializeDecoder:(id)decoder __attribute__((swift_name("deserialize(decoder:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) id descriptor; @end @protocol Kotlinx_serialization_coreKSerializer @@ -53,7 +53,7 @@ __attribute__((objc_subclassing_restricted)) /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ -- (Builder _Nullable)builder __attribute__((swift_name("builder()"))); +- (Builder _Nullable)builder; /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. @@ -126,9 +126,9 @@ __attribute__((objc_subclassing_restricted)) */ - (void)readElementDecoder:(id)decoder index:(int32_t)index builder:(MutableDictionary *)builder checkIndex:(BOOL)checkIndex __attribute__((swift_name("readElement(decoder:index:builder:checkIndex:)"))); - (void)serializeEncoder:(id)encoder value:(Collection _Nullable)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); -@property (readonly) id keySerializer __attribute__((swift_name("keySerializer"))); -@property (readonly) id valueSerializer __attribute__((swift_name("valueSerializer"))); +@property (readonly) id descriptor; +@property (readonly) id keySerializer; +@property (readonly) id valueSerializer; @end @protocol Kotlinx_serialization_coreEncoder @@ -149,13 +149,13 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (void)encodeNotNullMark __attribute__((swift_name("encodeNotNullMark()"))); +- (void)encodeNotNullMark; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (void)encodeNull __attribute__((swift_name("encodeNull()"))); +- (void)encodeNull; /** * @note annotations @@ -165,7 +165,7 @@ __attribute__((objc_subclassing_restricted)) - (void)encodeSerializableValueSerializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeSerializableValue(serializer:value:)"))); - (void)encodeShortValue:(int16_t)value __attribute__((swift_name("encodeShort(value:)"))); - (void)encodeStringValue:(NSString *)value __attribute__((swift_name("encodeString(value:)"))); -@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule; @end @protocol Kotlinx_serialization_coreSerialDescriptor @@ -205,58 +205,58 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) NSArray> *annotations __attribute__((swift_name("annotations"))); +@property (readonly) NSArray> *annotations; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) int32_t elementsCount __attribute__((swift_name("elementsCount"))); -@property (readonly) BOOL isInline __attribute__((swift_name("isInline"))); +@property (readonly) int32_t elementsCount; +@property (readonly) BOOL isInline; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) BOOL isNullable __attribute__((swift_name("isNullable"))); +@property (readonly) BOOL isNullable; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) Kotlinx_serialization_coreSerialKind *kind __attribute__((swift_name("kind"))); +@property (readonly) Kotlinx_serialization_coreSerialKind *kind; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) NSString *serialName __attribute__((swift_name("serialName"))); +@property (readonly) NSString *serialName; @end @protocol Kotlinx_serialization_coreDecoder @required - (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); -- (BOOL)decodeBoolean __attribute__((swift_name("decodeBoolean()"))); -- (int8_t)decodeByte __attribute__((swift_name("decodeByte()"))); -- (unichar)decodeChar __attribute__((swift_name("decodeChar()"))); -- (double)decodeDouble __attribute__((swift_name("decodeDouble()"))); +- (BOOL)decodeBoolean; +- (int8_t)decodeByte; +- (unichar)decodeChar; +- (double)decodeDouble; - (int32_t)decodeEnumEnumDescriptor:(id)enumDescriptor __attribute__((swift_name("decodeEnum(enumDescriptor:)"))); -- (float)decodeFloat __attribute__((swift_name("decodeFloat()"))); +- (float)decodeFloat; - (id)decodeInlineDescriptor:(id)descriptor __attribute__((swift_name("decodeInline(descriptor:)"))); -- (int32_t)decodeInt __attribute__((swift_name("decodeInt()"))); -- (int64_t)decodeLong __attribute__((swift_name("decodeLong()"))); +- (int32_t)decodeInt; +- (int64_t)decodeLong; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (BOOL)decodeNotNullMark __attribute__((swift_name("decodeNotNullMark()"))); +- (BOOL)decodeNotNullMark; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (KotlinNothing * _Nullable)decodeNull __attribute__((swift_name("decodeNull()"))); +- (KotlinNothing * _Nullable)decodeNull; /** * @note annotations @@ -264,15 +264,15 @@ __attribute__((objc_subclassing_restricted)) */ - (id _Nullable)decodeNullableSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeNullableSerializableValue(deserializer:)"))); - (id _Nullable)decodeSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeSerializableValue(deserializer:)"))); -- (int16_t)decodeShort __attribute__((swift_name("decodeShort()"))); -- (NSString *)decodeString __attribute__((swift_name("decodeString()"))); -@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +- (int16_t)decodeShort; +- (NSString *)decodeString; +@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end @protocol Kotlinx_serialization_coreCompositeDecoder @@ -298,18 +298,18 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (BOOL)decodeSequentially __attribute__((swift_name("decodeSequentially()"))); +- (BOOL)decodeSequentially; - (id _Nullable)decodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeSerializableElement(descriptor:index:deserializer:previousValue:)"))); - (int16_t)decodeShortElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeShortElement(descriptor:index:)"))); - (NSString *)decodeStringElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeStringElement(descriptor:index:)"))); - (void)endStructureDescriptor:(id)descriptor __attribute__((swift_name("endStructure(descriptor:)"))); -@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule; @end @protocol KotlinMapEntry @required -@property (readonly) id _Nullable key __attribute__((swift_name("key"))); -@property (readonly) id _Nullable value __attribute__((swift_name("value"))); +@property (readonly) id _Nullable key; +@property (readonly) id _Nullable value; @end @protocol Kotlinx_serialization_coreCompositeEncoder @@ -338,7 +338,7 @@ __attribute__((objc_subclassing_restricted)) * kotlinx.serialization.ExperimentalSerializationApi */ - (BOOL)shouldEncodeElementDefaultDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("shouldEncodeElementDefault(descriptor:index:)"))); -@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule; @end @interface Kotlinx_serialization_coreSerializersModule : Base @@ -378,8 +378,8 @@ __attribute__((objc_subclassing_restricted)) * kotlinx.serialization.ExperimentalSerializationApi */ @interface Kotlinx_serialization_coreSerialKind : Base -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); +- (NSUInteger)hash; +- (NSString *)description; @end __attribute__((objc_subclassing_restricted)) @@ -426,8 +426,8 @@ __attribute__((objc_subclassing_restricted)) * kotlin.SinceKotlin(version="1.1") */ - (BOOL)isInstanceValue:(id _Nullable)value __attribute__((swift_name("isInstance(value:)"))); -@property (readonly) NSString * _Nullable qualifiedName __attribute__((swift_name("qualifiedName"))); -@property (readonly) NSString * _Nullable simpleName __attribute__((swift_name("simpleName"))); +@property (readonly) NSString * _Nullable qualifiedName; +@property (readonly) NSString * _Nullable simpleName; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/notExportedDependency/!notExportedDependency.h b/native/objcexport-header-generator/testData/dependencies/notExportedDependency/!notExportedDependency.h index f23f7a274ae9d..27b941a10d6a1 100644 --- a/native/objcexport-header-generator/testData/dependencies/notExportedDependency/!notExportedDependency.h +++ b/native/objcexport-header-generator/testData/dependencies/notExportedDependency/!notExportedDependency.h @@ -140,24 +140,24 @@ __attribute__((swift_name("KotlinBoolean"))) __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("FooKt"))) @interface MyAppFooKt : MyAppBase -+ (MyAppTLAMyLibraryA *)foo __attribute__((swift_name("foo()"))); -+ (id)withIterator __attribute__((swift_name("withIterator()"))); ++ (MyAppTLAMyLibraryA *)foo; ++ (id)withIterator; @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("TLAMyLibraryA"))) @interface MyAppTLAMyLibraryA : MyAppBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (int32_t)returnInt __attribute__((swift_name("returnInt()"))); -- (MyAppTLAMyLibraryA *)returnMe __attribute__((swift_name("returnMe()"))); +- (int32_t)returnInt; +- (MyAppTLAMyLibraryA *)returnMe; @end __attribute__((swift_name("KotlinIterator"))) @protocol MyAppKotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end @interface MyAppBase (MyAppBaseCopying) diff --git a/native/objcexport-header-generator/testData/dependencies/oneTypeExtensionsFromMultipleFilesMergedIntoTheSameCategory/!oneTypeExtensionsFromMultipleFilesMergedIntoTheSameCategory.h b/native/objcexport-header-generator/testData/dependencies/oneTypeExtensionsFromMultipleFilesMergedIntoTheSameCategory/!oneTypeExtensionsFromMultipleFilesMergedIntoTheSameCategory.h index b4c8b0c6db99c..3bdff3aa52c2c 100644 --- a/native/objcexport-header-generator/testData/dependencies/oneTypeExtensionsFromMultipleFilesMergedIntoTheSameCategory/!oneTypeExtensionsFromMultipleFilesMergedIntoTheSameCategory.h +++ b/native/objcexport-header-generator/testData/dependencies/oneTypeExtensionsFromMultipleFilesMergedIntoTheSameCategory/!oneTypeExtensionsFromMultipleFilesMergedIntoTheSameCategory.h @@ -22,14 +22,14 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end @interface Foo (Extensions) -- (void)bar __attribute__((swift_name("bar()"))); -- (void)extensionA __attribute__((swift_name("extensionA()"))); -- (void)extensionB __attribute__((swift_name("extensionB()"))); +- (void)bar; +- (void)extensionA; +- (void)extensionB; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/propertyAnnotation/!propertyAnnotation.h b/native/objcexport-header-generator/testData/dependencies/propertyAnnotation/!propertyAnnotation.h index 658f4d04327f6..36c2eb00b17a1 100644 --- a/native/objcexport-header-generator/testData/dependencies/propertyAnnotation/!propertyAnnotation.h +++ b/native/objcexport-header-generator/testData/dependencies/propertyAnnotation/!propertyAnnotation.h @@ -25,15 +25,15 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (class, readonly) NSString *experimentVal __attribute__((swift_name("experimentVal"))); +@property (class, readonly) NSString *experimentVal; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (class) NSString *experimentVar __attribute__((swift_name("experimentVar"))); -@property (class, readonly) NSString *localVal __attribute__((swift_name("localVal"))); -@property (class) NSString *localVar __attribute__((swift_name("localVar"))); +@property (class) NSString *experimentVar; +@property (class, readonly) NSString *localVal; +@property (class) NSString *localVar; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/propertyWithCompanionTypeFromDependency/!propertyWithCompanionTypeFromDependency.h b/native/objcexport-header-generator/testData/dependencies/propertyWithCompanionTypeFromDependency/!propertyWithCompanionTypeFromDependency.h index 13cc8ecdda084..5baff28afddcd 100644 --- a/native/objcexport-header-generator/testData/dependencies/propertyWithCompanionTypeFromDependency/!propertyWithCompanionTypeFromDependency.h +++ b/native/objcexport-header-generator/testData/dependencies/propertyWithCompanionTypeFromDependency/!propertyWithCompanionTypeFromDependency.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) KotlinDoubleCompanion *foo __attribute__((swift_name("foo"))); +@property (class, readonly) KotlinDoubleCompanion *foo; @end __attribute__((objc_subclassing_restricted)) @@ -31,7 +31,7 @@ __attribute__((swift_name("KotlinDouble.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinDoubleCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinDoubleCompanion *shared; @property (readonly) double MAX_VALUE __attribute__((swift_name("MAX_VALUE"))); @property (readonly) double MIN_VALUE __attribute__((swift_name("MIN_VALUE"))); @property (readonly) double NEGATIVE_INFINITY __attribute__((swift_name("NEGATIVE_INFINITY"))); diff --git a/native/objcexport-header-generator/testData/dependencies/serializersModule/!serializersModule.h b/native/objcexport-header-generator/testData/dependencies/serializersModule/!serializersModule.h index baf81d0ab9499..2aece66b8ff90 100644 --- a/native/objcexport-header-generator/testData/dependencies/serializersModule/!serializersModule.h +++ b/native/objcexport-header-generator/testData/dependencies/serializersModule/!serializersModule.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) Kotlinx_serialization_coreSerializersModule * _Nullable foo __attribute__((swift_name("foo"))); +@property (class, readonly) Kotlinx_serialization_coreSerializersModule * _Nullable foo; @end @interface Kotlinx_serialization_coreSerializersModule : Base @@ -72,13 +72,13 @@ __attribute__((objc_subclassing_restricted)) @protocol Kotlinx_serialization_coreSerializationStrategy @required - (void)serializeEncoder:(id)encoder value:(id _Nullable)value __attribute__((swift_name("serialize(encoder:value:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) id descriptor; @end @protocol Kotlinx_serialization_coreDeserializationStrategy @required - (id _Nullable)deserializeDecoder:(id)decoder __attribute__((swift_name("deserialize(decoder:)"))); -@property (readonly) id descriptor __attribute__((swift_name("descriptor"))); +@property (readonly) id descriptor; @end @protocol Kotlinx_serialization_coreKSerializer @@ -110,8 +110,8 @@ __attribute__((objc_subclassing_restricted)) * kotlin.SinceKotlin(version="1.1") */ - (BOOL)isInstanceValue:(id _Nullable)value __attribute__((swift_name("isInstance(value:)"))); -@property (readonly) NSString * _Nullable qualifiedName __attribute__((swift_name("qualifiedName"))); -@property (readonly) NSString * _Nullable simpleName __attribute__((swift_name("simpleName"))); +@property (readonly) NSString * _Nullable qualifiedName; +@property (readonly) NSString * _Nullable simpleName; @end @protocol Kotlinx_serialization_coreEncoder @@ -132,13 +132,13 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (void)encodeNotNullMark __attribute__((swift_name("encodeNotNullMark()"))); +- (void)encodeNotNullMark; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (void)encodeNull __attribute__((swift_name("encodeNull()"))); +- (void)encodeNull; /** * @note annotations @@ -148,7 +148,7 @@ __attribute__((objc_subclassing_restricted)) - (void)encodeSerializableValueSerializer:(id)serializer value:(id _Nullable)value __attribute__((swift_name("encodeSerializableValue(serializer:value:)"))); - (void)encodeShortValue:(int16_t)value __attribute__((swift_name("encodeShort(value:)"))); - (void)encodeStringValue:(NSString *)value __attribute__((swift_name("encodeString(value:)"))); -@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule; @end @protocol Kotlinx_serialization_coreSerialDescriptor @@ -188,58 +188,58 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) NSArray> *annotations __attribute__((swift_name("annotations"))); +@property (readonly) NSArray> *annotations; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) int32_t elementsCount __attribute__((swift_name("elementsCount"))); -@property (readonly) BOOL isInline __attribute__((swift_name("isInline"))); +@property (readonly) int32_t elementsCount; +@property (readonly) BOOL isInline; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) BOOL isNullable __attribute__((swift_name("isNullable"))); +@property (readonly) BOOL isNullable; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) Kotlinx_serialization_coreSerialKind *kind __attribute__((swift_name("kind"))); +@property (readonly) Kotlinx_serialization_coreSerialKind *kind; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -@property (readonly) NSString *serialName __attribute__((swift_name("serialName"))); +@property (readonly) NSString *serialName; @end @protocol Kotlinx_serialization_coreDecoder @required - (id)beginStructureDescriptor:(id)descriptor __attribute__((swift_name("beginStructure(descriptor:)"))); -- (BOOL)decodeBoolean __attribute__((swift_name("decodeBoolean()"))); -- (int8_t)decodeByte __attribute__((swift_name("decodeByte()"))); -- (unichar)decodeChar __attribute__((swift_name("decodeChar()"))); -- (double)decodeDouble __attribute__((swift_name("decodeDouble()"))); +- (BOOL)decodeBoolean; +- (int8_t)decodeByte; +- (unichar)decodeChar; +- (double)decodeDouble; - (int32_t)decodeEnumEnumDescriptor:(id)enumDescriptor __attribute__((swift_name("decodeEnum(enumDescriptor:)"))); -- (float)decodeFloat __attribute__((swift_name("decodeFloat()"))); +- (float)decodeFloat; - (id)decodeInlineDescriptor:(id)descriptor __attribute__((swift_name("decodeInline(descriptor:)"))); -- (int32_t)decodeInt __attribute__((swift_name("decodeInt()"))); -- (int64_t)decodeLong __attribute__((swift_name("decodeLong()"))); +- (int32_t)decodeInt; +- (int64_t)decodeLong; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (BOOL)decodeNotNullMark __attribute__((swift_name("decodeNotNullMark()"))); +- (BOOL)decodeNotNullMark; /** * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (KotlinNothing * _Nullable)decodeNull __attribute__((swift_name("decodeNull()"))); +- (KotlinNothing * _Nullable)decodeNull; /** * @note annotations @@ -247,9 +247,9 @@ __attribute__((objc_subclassing_restricted)) */ - (id _Nullable)decodeNullableSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeNullableSerializableValue(deserializer:)"))); - (id _Nullable)decodeSerializableValueDeserializer:(id)deserializer __attribute__((swift_name("decodeSerializableValue(deserializer:)"))); -- (int16_t)decodeShort __attribute__((swift_name("decodeShort()"))); -- (NSString *)decodeString __attribute__((swift_name("decodeString()"))); -@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +- (int16_t)decodeShort; +- (NSString *)decodeString; +@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule; @end @protocol Kotlinx_serialization_coreCompositeEncoder @@ -278,7 +278,7 @@ __attribute__((objc_subclassing_restricted)) * kotlinx.serialization.ExperimentalSerializationApi */ - (BOOL)shouldEncodeElementDefaultDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("shouldEncodeElementDefault(descriptor:index:)"))); -@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule; @end @protocol KotlinAnnotation @@ -291,8 +291,8 @@ __attribute__((objc_subclassing_restricted)) * kotlinx.serialization.ExperimentalSerializationApi */ @interface Kotlinx_serialization_coreSerialKind : Base -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); +- (NSUInteger)hash; +- (NSString *)description; @end @protocol Kotlinx_serialization_coreCompositeDecoder @@ -318,12 +318,12 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlinx.serialization.ExperimentalSerializationApi */ -- (BOOL)decodeSequentially __attribute__((swift_name("decodeSequentially()"))); +- (BOOL)decodeSequentially; - (id _Nullable)decodeSerializableElementDescriptor:(id)descriptor index:(int32_t)index deserializer:(id)deserializer previousValue:(id _Nullable)previousValue __attribute__((swift_name("decodeSerializableElement(descriptor:index:deserializer:previousValue:)"))); - (int16_t)decodeShortElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeShortElement(descriptor:index:)"))); - (NSString *)decodeStringElementDescriptor:(id)descriptor index:(int32_t)index __attribute__((swift_name("decodeStringElement(descriptor:index:)"))); - (void)endStructureDescriptor:(id)descriptor __attribute__((swift_name("endStructure(descriptor:)"))); -@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule __attribute__((swift_name("serializersModule"))); +@property (readonly) Kotlinx_serialization_coreSerializersModule *serializersModule; @end __attribute__((objc_subclassing_restricted)) diff --git a/native/objcexport-header-generator/testData/dependencies/stringBuilder/!stringBuilder.h b/native/objcexport-header-generator/testData/dependencies/stringBuilder/!stringBuilder.h index 23b0fabe53700..2a3830bad4008 100644 --- a/native/objcexport-header-generator/testData/dependencies/stringBuilder/!stringBuilder.h +++ b/native/objcexport-header-generator/testData/dependencies/stringBuilder/!stringBuilder.h @@ -24,14 +24,14 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) KotlinStringBuilder *a __attribute__((swift_name("a"))); +@property (class, readonly) KotlinStringBuilder *a; @end @protocol KotlinCharSequence @required - (unichar)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); - (id)subSequenceStartIndex:(int32_t)startIndex endIndex:(int32_t)endIndex __attribute__((swift_name("subSequence(startIndex:endIndex:)"))); -@property (readonly) int32_t length __attribute__((swift_name("length"))); +@property (readonly) int32_t length; @end @protocol KotlinAppendable @@ -58,7 +58,7 @@ __attribute__((objc_subclassing_restricted)) __attribute__((objc_subclassing_restricted)) @interface KotlinStringBuilder : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithContent:(id)content __attribute__((swift_name("init(content:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCapacity:(int32_t)capacity __attribute__((swift_name("init(capacity:)"))) __attribute__((objc_designated_initializer)); @@ -155,7 +155,7 @@ __attribute__((objc_subclassing_restricted)) * kotlin.IgnorableReturnValue */ - (KotlinStringBuilder *)appendRangeValue:(id)value startIndex:(int32_t)startIndex endIndex_:(int32_t)endIndex __attribute__((swift_name("appendRange(value:startIndex:endIndex_:)"))); -- (int32_t)capacity __attribute__((swift_name("capacity()"))); +- (int32_t)capacity; /** * @note annotations @@ -287,7 +287,7 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlin.IgnorableReturnValue */ -- (KotlinStringBuilder *)reverse __attribute__((swift_name("reverse()"))); +- (KotlinStringBuilder *)reverse; - (void)setIndex:(int32_t)index value:(unichar)value __attribute__((swift_name("set(index:value:)"))); - (void)setLengthNewLength:(int32_t)newLength __attribute__((swift_name("setLength(newLength:)"))); @@ -311,9 +311,9 @@ __attribute__((objc_subclassing_restricted)) * kotlin.SinceKotlin(version="1.4") */ - (void)toCharArrayDestination:(KotlinCharArray *)destination destinationOffset:(int32_t)destinationOffset startIndex:(int32_t)startIndex endIndex:(int32_t)endIndex __attribute__((swift_name("toCharArray(destination:destinationOffset:startIndex:endIndex:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); -- (void)trimToSize __attribute__((swift_name("trimToSize()"))); -@property (readonly) int32_t length __attribute__((swift_name("length"))); +- (NSString *)description; +- (void)trimToSize; +@property (readonly) int32_t length; @end __attribute__((objc_subclassing_restricted)) @@ -323,22 +323,22 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (unichar)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (KotlinCharIterator *)iterator __attribute__((swift_name("iterator()"))); +- (KotlinCharIterator *)iterator; - (void)setIndex:(int32_t)index value:(unichar)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end @interface KotlinCharIterator : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (id)next __attribute__((swift_name("next()"))); -- (unichar)nextChar __attribute__((swift_name("nextChar()"))); +- (id)next; +- (unichar)nextChar; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/suspendHandlerTranslatedAsResultAndErrorParameters/!suspendHandlerTranslatedAsResultAndErrorParameters.h b/native/objcexport-header-generator/testData/dependencies/suspendHandlerTranslatedAsResultAndErrorParameters/!suspendHandlerTranslatedAsResultAndErrorParameters.h index e1f54526d0634..e0aff47b82119 100644 --- a/native/objcexport-header-generator/testData/dependencies/suspendHandlerTranslatedAsResultAndErrorParameters/!suspendHandlerTranslatedAsResultAndErrorParameters.h +++ b/native/objcexport-header-generator/testData/dependencies/suspendHandlerTranslatedAsResultAndErrorParameters/!suspendHandlerTranslatedAsResultAndErrorParameters.h @@ -39,7 +39,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface KotlinThrowable : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -49,16 +49,16 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlin.experimental.ExperimentalNativeApi */ -- (KotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); -- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) KotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); -@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); -- (NSError *)asError __attribute__((swift_name("asError()"))); +- (KotlinArray *)getStackTrace; +- (void)printStackTrace; +- (NSString *)description; +@property (readonly) KotlinThrowable * _Nullable cause; +@property (readonly) NSString * _Nullable message; +- (NSError *)asError; @end @interface KotlinException : KotlinThrowable -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -66,7 +66,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface KotlinRuntimeException : KotlinException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -74,7 +74,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface KotlinIllegalStateException : KotlinRuntimeException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -87,7 +87,7 @@ __attribute__((objc_subclassing_restricted)) * kotlin.SinceKotlin(version="1.4") */ @interface KotlinCancellationException : KotlinIllegalStateException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -100,15 +100,15 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/dependencies/topLevelFunctionAndExtensionWithDependency/!topLevelFunctionAndExtensionWithDependency.h b/native/objcexport-header-generator/testData/dependencies/topLevelFunctionAndExtensionWithDependency/!topLevelFunctionAndExtensionWithDependency.h index eda5b59f018d6..db0b53c02f98c 100644 --- a/native/objcexport-header-generator/testData/dependencies/topLevelFunctionAndExtensionWithDependency/!topLevelFunctionAndExtensionWithDependency.h +++ b/native/objcexport-header-generator/testData/dependencies/topLevelFunctionAndExtensionWithDependency/!topLevelFunctionAndExtensionWithDependency.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface TELFoo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end @@ -32,7 +32,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface TELFoo (Extensions) -- (void)fooExtension __attribute__((swift_name("fooExtension()"))); +- (void)fooExtension; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/anonymousFunctions/!anonymousFunctions.h b/native/objcexport-header-generator/testData/headers/anonymousFunctions/!anonymousFunctions.h index dc8d9112fdf1e..1d9bcda89e0f1 100644 --- a/native/objcexport-header-generator/testData/headers/anonymousFunctions/!anonymousFunctions.h +++ b/native/objcexport-header-generator/testData/headers/anonymousFunctions/!anonymousFunctions.h @@ -22,9 +22,9 @@ __attribute__((objc_subclassing_restricted)) @interface FooKt : Base + (void)funParamParam:(void (^)(void))param __attribute__((swift_name("funParam(param:)"))); + (void)funParamDefaultParam:(void (^)(void))param __attribute__((swift_name("funParamDefault(param:)"))); -+ (void (^)(void))funReturnsFun __attribute__((swift_name("funReturnsFun()"))); -+ (void (^ _Nullable)(void))funReturnsNullableFun __attribute__((swift_name("funReturnsNullableFun()"))); -@property (class, readonly) void (^funProperty)(void) __attribute__((swift_name("funProperty"))); ++ (void (^)(void))funReturnsFun; ++ (void (^ _Nullable)(void))funReturnsNullableFun; +@property (class, readonly) void (^funProperty)(void); @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/anyMethodsOverride/!anyMethodsOverride.h b/native/objcexport-header-generator/testData/headers/anyMethodsOverride/!anyMethodsOverride.h index 4ac6b1116fc42..9bde0b88f8c43 100644 --- a/native/objcexport-header-generator/testData/headers/anyMethodsOverride/!anyMethodsOverride.h +++ b/native/objcexport-header-generator/testData/headers/anyMethodsOverride/!anyMethodsOverride.h @@ -20,36 +20,36 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Mix : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)equals __attribute__((swift_name("equals()"))); +- (void)equals; - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); - (void)equalsParam:(int32_t)param __attribute__((swift_name("equals(param:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); +- (NSUInteger)hash; - (int32_t)hashCodeParam:(int32_t)param __attribute__((swift_name("hashCode(param:)"))); -- (NSString *)description __attribute__((swift_name("description()"))); +- (NSString *)description; - (NSString *)toStringParam:(int32_t)param __attribute__((swift_name("toString(param:)"))); @end __attribute__((objc_subclassing_restricted)) @interface NoParams : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)equals __attribute__((swift_name("equals()"))); +- (void)equals; @end __attribute__((objc_subclassing_restricted)) @interface Override : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); +- (NSUInteger)hash; +- (NSString *)description; @end __attribute__((objc_subclassing_restricted)) @interface WithParams : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (void)equalsParam:(int32_t)param __attribute__((swift_name("equals(param:)"))); - (int32_t)hashCodeParam:(int32_t)param __attribute__((swift_name("hashCode(param:)"))); diff --git a/native/objcexport-header-generator/testData/headers/basicConstructorWithUpperBoundParameters/!basicConstructorWithUpperBoundParameters.h b/native/objcexport-header-generator/testData/headers/basicConstructorWithUpperBoundParameters/!basicConstructorWithUpperBoundParameters.h index e5306631c6c1b..ecc1569583a79 100644 --- a/native/objcexport-header-generator/testData/headers/basicConstructorWithUpperBoundParameters/!basicConstructorWithUpperBoundParameters.h +++ b/native/objcexport-header-generator/testData/headers/basicConstructorWithUpperBoundParameters/!basicConstructorWithUpperBoundParameters.h @@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooReturnA : ReturnA, id> -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithReturnA:(id (^)(void))returnA __attribute__((swift_name("init(returnA:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); @end @@ -39,7 +39,7 @@ __attribute__((objc_subclassing_restricted)) __attribute__((objc_subclassing_restricted)) @interface FooReturnB : ReturnB, id> -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithReturnB:(id (^)(void))returnB __attribute__((swift_name("init(returnB:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); @end diff --git a/native/objcexport-header-generator/testData/headers/basicGenericsInAndOut/!basicGenericsInAndOut.h b/native/objcexport-header-generator/testData/headers/basicGenericsInAndOut/!basicGenericsInAndOut.h index 9d97f6520bc3d..1711e300afc45 100644 --- a/native/objcexport-header-generator/testData/headers/basicGenericsInAndOut/!basicGenericsInAndOut.h +++ b/native/objcexport-header-generator/testData/headers/basicGenericsInAndOut/!basicGenericsInAndOut.h @@ -20,16 +20,16 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Bar<__contravariant T> : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (void)fooT:(T)t __attribute__((swift_name("foo(t:)"))); @end __attribute__((objc_subclassing_restricted)) @interface Foo<__covariant T> : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (T)bar __attribute__((swift_name("bar()"))); +- (T)bar; @end @protocol UpperBound diff --git a/native/objcexport-header-generator/testData/headers/basicMethodParameterWithUpperBound/!basicMethodParameterWithUpperBound.h b/native/objcexport-header-generator/testData/headers/basicMethodParameterWithUpperBound/!basicMethodParameterWithUpperBound.h index 8dfe754dd7eac..561f040e9a15c 100644 --- a/native/objcexport-header-generator/testData/headers/basicMethodParameterWithUpperBound/!basicMethodParameterWithUpperBound.h +++ b/native/objcexport-header-generator/testData/headers/basicMethodParameterWithUpperBound/!basicMethodParameterWithUpperBound.h @@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN #endif @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (void)withParameterT:(id)t __attribute__((swift_name("withParameter(t:)"))); - (void)withoutParameterT:(T)t __attribute__((swift_name("withoutParameter(t:)"))); diff --git a/native/objcexport-header-generator/testData/headers/blockWithExplicitParameterNames/!blockWithExplicitParameterNames.h b/native/objcexport-header-generator/testData/headers/blockWithExplicitParameterNames/!blockWithExplicitParameterNames.h index 274e463402720..20f6561253f93 100644 --- a/native/objcexport-header-generator/testData/headers/blockWithExplicitParameterNames/!blockWithExplicitParameterNames.h +++ b/native/objcexport-header-generator/testData/headers/blockWithExplicitParameterNames/!blockWithExplicitParameterNames.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (void)bar0Cb:(void (^)(Int *result))cb __attribute__((swift_name("bar0(cb:)"))); - (void)bar1Cb:(void (^)(Int *a))cb __attribute__((swift_name("bar1(cb:)"))); diff --git a/native/objcexport-header-generator/testData/headers/blockWithNoParameterNames/!blockWithNoParameterNames.h b/native/objcexport-header-generator/testData/headers/blockWithNoParameterNames/!blockWithNoParameterNames.h index e8b31115e7aee..2f10772eead08 100644 --- a/native/objcexport-header-generator/testData/headers/blockWithNoParameterNames/!blockWithNoParameterNames.h +++ b/native/objcexport-header-generator/testData/headers/blockWithNoParameterNames/!blockWithNoParameterNames.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (void)bar0Cb:(void (^)(Int *))cb __attribute__((swift_name("bar0(cb:)"))); - (void)bar1Cb:(void (^)(Int *))cb __attribute__((swift_name("bar1(cb:)"))); diff --git a/native/objcexport-header-generator/testData/headers/cProperties/!cProperties.h b/native/objcexport-header-generator/testData/headers/cProperties/!cProperties.h index 6fc792b138429..a75b89180d7e2 100644 --- a/native/objcexport-header-generator/testData/headers/cProperties/!cProperties.h +++ b/native/objcexport-header-generator/testData/headers/cProperties/!cProperties.h @@ -20,8 +20,8 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly, getter=bool) BOOL bool_ __attribute__((swift_name("bool_"))); -@property (class, getter=complex, setter=setComplex:) int32_t complex_ __attribute__((swift_name("complex_"))); +@property (class, readonly, getter=bool) BOOL bool_; +@property (class, getter=complex, setter=setComplex:) int32_t complex_; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/classAndExtensionFunctionInSameFile/!classAndExtensionFunctionInSameFile.h b/native/objcexport-header-generator/testData/headers/classAndExtensionFunctionInSameFile/!classAndExtensionFunctionInSameFile.h index dfd6e4090be03..cf1d66762f4e1 100644 --- a/native/objcexport-header-generator/testData/headers/classAndExtensionFunctionInSameFile/!classAndExtensionFunctionInSameFile.h +++ b/native/objcexport-header-generator/testData/headers/classAndExtensionFunctionInSameFile/!classAndExtensionFunctionInSameFile.h @@ -22,12 +22,12 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end @interface Foo (Extensions) -- (void)bar __attribute__((swift_name("bar()"))); +- (void)bar; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/classExtendsAbstractClass/!classExtendsAbstractClass.h b/native/objcexport-header-generator/testData/headers/classExtendsAbstractClass/!classExtendsAbstractClass.h index e09df8708ee6a..6cba9405de01f 100644 --- a/native/objcexport-header-generator/testData/headers/classExtendsAbstractClass/!classExtendsAbstractClass.h +++ b/native/objcexport-header-generator/testData/headers/classExtendsAbstractClass/!classExtendsAbstractClass.h @@ -21,21 +21,21 @@ NS_ASSUME_NONNULL_BEGIN #endif @interface A : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)a0 __attribute__((swift_name("a0()"))); +- (void)a0; - (void)a1I:(int32_t)i __attribute__((swift_name("a1(i:)"))); - (void)a2B:(BOOL)b a:(id)a __attribute__((swift_name("a2(b:a:)"))); @end __attribute__((objc_subclassing_restricted)) @interface B : A -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)a0 __attribute__((swift_name("a0()"))); +- (void)a0; - (void)a1I:(int32_t)i __attribute__((swift_name("a1(i:)"))); - (void)a2B:(BOOL)b a:(id)a __attribute__((swift_name("a2(b:a:)"))); -- (void)b0 __attribute__((swift_name("b0()"))); +- (void)b0; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/classImplementingInterface/!classImplementingInterface.h b/native/objcexport-header-generator/testData/headers/classImplementingInterface/!classImplementingInterface.h index ba5bc4a02b5fd..8b3d454591a58 100644 --- a/native/objcexport-header-generator/testData/headers/classImplementingInterface/!classImplementingInterface.h +++ b/native/objcexport-header-generator/testData/headers/classImplementingInterface/!classImplementingInterface.h @@ -22,18 +22,18 @@ NS_ASSUME_NONNULL_BEGIN @protocol Foo @required -- (id)someMethod __attribute__((swift_name("someMethod()"))); -- (id)someMethodWithCovariantOverwrite __attribute__((swift_name("someMethodWithCovariantOverwrite()"))); -@property (readonly) int32_t someProperty __attribute__((swift_name("someProperty"))); +- (id)someMethod; +- (id)someMethodWithCovariantOverwrite; +@property (readonly) int32_t someProperty; @end __attribute__((objc_subclassing_restricted)) @interface Bar : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (id)someMethod __attribute__((swift_name("someMethod()"))); -- (NSString *)someMethodWithCovariantOverwrite __attribute__((swift_name("someMethodWithCovariantOverwrite()"))); -@property (readonly) int32_t someProperty __attribute__((swift_name("someProperty"))); +- (id)someMethod; +- (NSString *)someMethodWithCovariantOverwrite; +@property (readonly) int32_t someProperty; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/classReferencingDependencyClassAsReturnType/!classReferencingDependencyClassAsReturnType.h b/native/objcexport-header-generator/testData/headers/classReferencingDependencyClassAsReturnType/!classReferencingDependencyClassAsReturnType.h index ecf3f0fe9b45a..134627f3f4423 100644 --- a/native/objcexport-header-generator/testData/headers/classReferencingDependencyClassAsReturnType/!classReferencingDependencyClassAsReturnType.h +++ b/native/objcexport-header-generator/testData/headers/classReferencingDependencyClassAsReturnType/!classReferencingDependencyClassAsReturnType.h @@ -24,22 +24,22 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (KotlinIntIterator *)foo __attribute__((swift_name("foo()"))); +- (KotlinIntIterator *)foo; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end @interface KotlinIntIterator : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (Int *)next __attribute__((swift_name("next()"))); -- (int32_t)nextInt __attribute__((swift_name("nextInt()"))); +- (Int *)next; +- (int32_t)nextInt; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/classReferencingOtherClassAsReturnType/!classReferencingOtherClassAsReturnType.h b/native/objcexport-header-generator/testData/headers/classReferencingOtherClassAsReturnType/!classReferencingOtherClassAsReturnType.h index 3b1b85352508c..e62b358520437 100644 --- a/native/objcexport-header-generator/testData/headers/classReferencingOtherClassAsReturnType/!classReferencingOtherClassAsReturnType.h +++ b/native/objcexport-header-generator/testData/headers/classReferencingOtherClassAsReturnType/!classReferencingOtherClassAsReturnType.h @@ -22,14 +22,14 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface A : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (B *)foo __attribute__((swift_name("foo()"))); +- (B *)foo; @end __attribute__((objc_subclassing_restricted)) @interface B : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/classTypePropertyTranslation/!classTypePropertyTranslation.h b/native/objcexport-header-generator/testData/headers/classTypePropertyTranslation/!classTypePropertyTranslation.h index 3afedb41e60dd..aac905c55715a 100644 --- a/native/objcexport-header-generator/testData/headers/classTypePropertyTranslation/!classTypePropertyTranslation.h +++ b/native/objcexport-header-generator/testData/headers/classTypePropertyTranslation/!classTypePropertyTranslation.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (int32_t)extensionProperty:(Foo *)receiver __attribute__((swift_name("extensionProperty(_:)"))); @end diff --git a/native/objcexport-header-generator/testData/headers/classWithGenerics/!classWithGenerics.h b/native/objcexport-header-generator/testData/headers/classWithGenerics/!classWithGenerics.h index b652853d32ee5..27ce98a9be270 100644 --- a/native/objcexport-header-generator/testData/headers/classWithGenerics/!classWithGenerics.h +++ b/native/objcexport-header-generator/testData/headers/classWithGenerics/!classWithGenerics.h @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN #endif @interface A : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end @@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : A -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/classWithHidesFromObjCAnnotation/!classWithHidesFromObjCAnnotation.h b/native/objcexport-header-generator/testData/headers/classWithHidesFromObjCAnnotation/!classWithHidesFromObjCAnnotation.h index b0dc331818f1e..520d09915d1aa 100644 --- a/native/objcexport-header-generator/testData/headers/classWithHidesFromObjCAnnotation/!classWithHidesFromObjCAnnotation.h +++ b/native/objcexport-header-generator/testData/headers/classWithHidesFromObjCAnnotation/!classWithHidesFromObjCAnnotation.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface NotHidden : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/classWithKDoc/!classWithKDoc.h b/native/objcexport-header-generator/testData/headers/classWithKDoc/!classWithKDoc.h index 4b9a18e5fdb92..15017002d49d9 100644 --- a/native/objcexport-header-generator/testData/headers/classWithKDoc/!classWithKDoc.h +++ b/native/objcexport-header-generator/testData/headers/classWithKDoc/!classWithKDoc.h @@ -28,7 +28,7 @@ __attribute__((objc_subclassing_restricted)) /** * This class [Foo] is documented. */ -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); /** * This class [Foo] is documented. @@ -38,13 +38,13 @@ __attribute__((objc_subclassing_restricted)) /** * This member function is documented */ -- (void)someMemberFunction __attribute__((swift_name("someMemberFunction()"))); +- (void)someMemberFunction; /** * This member property is documented. * It will return the 'The Answer to the Ultimate Question of Life, The Universe, and Everything' */ -@property (readonly) int32_t someMemberProperty __attribute__((swift_name("someMemberProperty"))); +@property (readonly) int32_t someMemberProperty; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/classWithManyMembers/!classWithManyMembers.h b/native/objcexport-header-generator/testData/headers/classWithManyMembers/!classWithManyMembers.h index b462f16bf0d75..95fd3e58c60b2 100644 --- a/native/objcexport-header-generator/testData/headers/classWithManyMembers/!classWithManyMembers.h +++ b/native/objcexport-header-generator/testData/headers/classWithManyMembers/!classWithManyMembers.h @@ -20,19 +20,19 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)a __attribute__((swift_name("a()"))); +- (void)a; - (void)aP0:(int32_t)p0 __attribute__((swift_name("a(p0:)"))); - (void)aP0:(int32_t)p0 p1:(int32_t)p1 __attribute__((swift_name("a(p0:p1:)"))); -- (void)b __attribute__((swift_name("b()"))); +- (void)b; - (void)bP0:(int32_t)p0 __attribute__((swift_name("b(p0:)"))); - (void)bP0:(int32_t)p0 p1:(int32_t)p1 __attribute__((swift_name("b(p0:p1:)"))); -- (void)c __attribute__((swift_name("c()"))); -- (int32_t)d __attribute__((swift_name("d()"))); -@property (readonly) int32_t pA __attribute__((swift_name("pA"))); -@property (readonly) int32_t pB __attribute__((swift_name("pB"))); -@property (readonly) int32_t pC __attribute__((swift_name("pC"))); +- (void)c; +- (int32_t)d; +@property (readonly) int32_t pA; +@property (readonly) int32_t pB; +@property (readonly) int32_t pC; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/classWithMustBeDocumentedAnnotation/!classWithMustBeDocumentedAnnotation.h b/native/objcexport-header-generator/testData/headers/classWithMustBeDocumentedAnnotation/!classWithMustBeDocumentedAnnotation.h index 088fe5cd4985c..dc9f8dac8e032 100644 --- a/native/objcexport-header-generator/testData/headers/classWithMustBeDocumentedAnnotation/!classWithMustBeDocumentedAnnotation.h +++ b/native/objcexport-header-generator/testData/headers/classWithMustBeDocumentedAnnotation/!classWithMustBeDocumentedAnnotation.h @@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN */ __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/classWithObjCNameAnnotation/!classWithObjCNameAnnotation.h b/native/objcexport-header-generator/testData/headers/classWithObjCNameAnnotation/!classWithObjCNameAnnotation.h index b6c2009ff36c5..8ebf2ec1598a7 100644 --- a/native/objcexport-header-generator/testData/headers/classWithObjCNameAnnotation/!classWithObjCNameAnnotation.h +++ b/native/objcexport-header-generator/testData/headers/classWithObjCNameAnnotation/!classWithObjCNameAnnotation.h @@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("FooInSwift"))) @interface FooInObjC : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/classWithReservedName/!classWithReservedName.h b/native/objcexport-header-generator/testData/headers/classWithReservedName/!classWithReservedName.h index 091c1c9388710..30ab18b4dc46e 100644 --- a/native/objcexport-header-generator/testData/headers/classWithReservedName/!classWithReservedName.h +++ b/native/objcexport-header-generator/testData/headers/classWithReservedName/!classWithReservedName.h @@ -20,97 +20,97 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface alloc : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface autorelease : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface class : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface classFallbacksForKeyedArchiver : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface classForKeyedUnarchiver : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface debugDescription : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface description : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface hash : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface initialize : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface load : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface new : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface release : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface retain : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface superclass : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface useStoredAccessor : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface version : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/classWithUnresolvedSuperType/!classWithUnresolvedSuperType.h b/native/objcexport-header-generator/testData/headers/classWithUnresolvedSuperType/!classWithUnresolvedSuperType.h index bbd846afbc938..2bd931e04d0d1 100644 --- a/native/objcexport-header-generator/testData/headers/classWithUnresolvedSuperType/!classWithUnresolvedSuperType.h +++ b/native/objcexport-header-generator/testData/headers/classWithUnresolvedSuperType/!classWithUnresolvedSuperType.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/classWithUnresolvedSuperTypeGenerics/!classWithUnresolvedSuperTypeGenerics.h b/native/objcexport-header-generator/testData/headers/classWithUnresolvedSuperTypeGenerics/!classWithUnresolvedSuperTypeGenerics.h index 82963739ef1ec..94ec3e280023c 100644 --- a/native/objcexport-header-generator/testData/headers/classWithUnresolvedSuperTypeGenerics/!classWithUnresolvedSuperTypeGenerics.h +++ b/native/objcexport-header-generator/testData/headers/classWithUnresolvedSuperTypeGenerics/!classWithUnresolvedSuperTypeGenerics.h @@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Bar : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/classifiersAnnotatedWithObjCName/!classifiersAnnotatedWithObjCName.h b/native/objcexport-header-generator/testData/headers/classifiersAnnotatedWithObjCName/!classifiersAnnotatedWithObjCName.h index 44955cf10fae0..d84237e8c47c5 100644 --- a/native/objcexport-header-generator/testData/headers/classifiersAnnotatedWithObjCName/!classifiersAnnotatedWithObjCName.h +++ b/native/objcexport-header-generator/testData/headers/classifiersAnnotatedWithObjCName/!classifiersAnnotatedWithObjCName.h @@ -20,20 +20,20 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface ClassObjC : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("ClassWithAnnotationSwift"))) @interface ClassWithAnnotationObjC : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface ClassWithoutAnnotation : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/collectionTypeArguments/!collectionTypeArguments.h b/native/objcexport-header-generator/testData/headers/collectionTypeArguments/!collectionTypeArguments.h index 184c589cef7dd..4e583b014e8b0 100644 --- a/native/objcexport-header-generator/testData/headers/collectionTypeArguments/!collectionTypeArguments.h +++ b/native/objcexport-header-generator/testData/headers/collectionTypeArguments/!collectionTypeArguments.h @@ -21,25 +21,25 @@ NS_ASSUME_NONNULL_BEGIN #endif @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface ListClass : Foo *> -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface MapClass : Foo *> -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface SetClass : Foo *> -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/companion/!companion.h b/native/objcexport-header-generator/testData/headers/companion/!companion.h index 302207f956fde..8744d51be1de0 100644 --- a/native/objcexport-header-generator/testData/headers/companion/!companion.h +++ b/native/objcexport-header-generator/testData/headers/companion/!companion.h @@ -22,9 +22,9 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo1 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (class, readonly, getter=companion) Foo1Companion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) Foo1Companion *companion; @end __attribute__((objc_subclassing_restricted)) @@ -33,18 +33,18 @@ __attribute__((swift_name("Foo1.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) Foo1Companion *shared __attribute__((swift_name("shared"))); -- (void)publicFoo __attribute__((swift_name("publicFoo()"))); -@property (readonly) int32_t constant __attribute__((swift_name("constant"))); -@property (readonly) Foo2Companion *refToFoo2 __attribute__((swift_name("refToFoo2"))); -@property (readonly) Foo1Companion *refToItself __attribute__((swift_name("refToItself"))); +@property (class, readonly, getter=shared) Foo1Companion *shared; +- (void)publicFoo; +@property (readonly) int32_t constant; +@property (readonly) Foo2Companion *refToFoo2; +@property (readonly) Foo1Companion *refToItself; @end __attribute__((objc_subclassing_restricted)) @interface Foo2 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (class, readonly, getter=companion) Foo2Companion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) Foo2Companion *companion; @end __attribute__((objc_subclassing_restricted)) @@ -53,18 +53,18 @@ __attribute__((swift_name("Foo2.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) Foo2Companion *shared __attribute__((swift_name("shared"))); -- (void)publicFoo __attribute__((swift_name("publicFoo()"))); -@property (readonly) int32_t constant __attribute__((swift_name("constant"))); -@property (readonly) Foo1Companion *refToFoo1 __attribute__((swift_name("refToFoo1"))); -@property (readonly) Foo2Companion *refToItself __attribute__((swift_name("refToItself"))); +@property (class, readonly, getter=shared) Foo2Companion *shared; +- (void)publicFoo; +@property (readonly) int32_t constant; +@property (readonly) Foo1Companion *refToFoo1; +@property (readonly) Foo2Companion *refToItself; @end __attribute__((objc_subclassing_restricted)) @interface Foo3 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (class, readonly, getter=companion) Foo3Companion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) Foo3Companion *companion; @end __attribute__((objc_subclassing_restricted)) @@ -73,14 +73,14 @@ __attribute__((swift_name("Foo3.Companion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) Foo3Companion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) Foo3Companion *shared; @end __attribute__((objc_subclassing_restricted)) @interface Foo4 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (class, readonly, getter=companion) Foo4NamedCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) Foo4NamedCompanion *companion; @end __attribute__((objc_subclassing_restricted)) @@ -89,14 +89,14 @@ __attribute__((swift_name("Foo4.NamedCompanion"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)namedCompanion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) Foo4NamedCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) Foo4NamedCompanion *shared; @end __attribute__((objc_subclassing_restricted)) @interface Foo5 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (class, readonly, getter=companion) Foo5CompanionInObjC *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) Foo5CompanionInObjC *companion; @end __attribute__((objc_subclassing_restricted)) @@ -105,7 +105,7 @@ __attribute__((swift_name("Foo5.CompanionInSwift"))) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companionInObjC __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) Foo5CompanionInObjC *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) Foo5CompanionInObjC *shared; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/constructors/!constructors.h b/native/objcexport-header-generator/testData/headers/constructors/!constructors.h index 6e5ce9bdeb2d8..24d4f7f24711b 100644 --- a/native/objcexport-header-generator/testData/headers/constructors/!constructors.h +++ b/native/objcexport-header-generator/testData/headers/constructors/!constructors.h @@ -37,21 +37,21 @@ __attribute__((objc_subclassing_restricted)) __attribute__((objc_subclassing_restricted)) @interface ConstructorParam0 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface ConstructorParam1 : Base - (instancetype)initWithA:(int32_t)a __attribute__((swift_name("init(a:)"))) __attribute__((objc_designated_initializer)); -@property (readonly) int32_t a __attribute__((swift_name("a"))); +@property (readonly) int32_t a; @end __attribute__((objc_subclassing_restricted)) @interface ConstructorParam2 : Base - (instancetype)initWithA:(int32_t)a b:(int32_t)b __attribute__((swift_name("init(a:b:)"))) __attribute__((objc_designated_initializer)); -@property (readonly) int32_t a __attribute__((swift_name("a"))); -@property (readonly) int32_t b __attribute__((swift_name("b"))); +@property (readonly) int32_t a; +@property (readonly) int32_t b; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/deprecatedHidden/!deprecatedHidden.h b/native/objcexport-header-generator/testData/headers/deprecatedHidden/!deprecatedHidden.h index 56caa1715f43a..66b6bd5d9102d 100644 --- a/native/objcexport-header-generator/testData/headers/deprecatedHidden/!deprecatedHidden.h +++ b/native/objcexport-header-generator/testData/headers/deprecatedHidden/!deprecatedHidden.h @@ -22,15 +22,15 @@ NS_ASSUME_NONNULL_BEGIN @protocol FooBase @required -- (void)descendantHiddenLevel __attribute__((swift_name("descendantHiddenLevel()"))); +- (void)descendantHiddenLevel; @end __attribute__((objc_subclassing_restricted)) @interface FooImpl : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)descendantHiddenLevel __attribute__((swift_name("descendantHiddenLevel()"))) __attribute__((unavailable("message: descendantHidden"))); -- (void)hiddenLevel __attribute__((swift_name("hiddenLevel()"))); +- (void)descendantHiddenLevel __attribute__((unavailable("message: descendantHidden"))); +- (void)hiddenLevel; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/deprecatedWarningAndError/!deprecatedWarningAndError.h b/native/objcexport-header-generator/testData/headers/deprecatedWarningAndError/!deprecatedWarningAndError.h index de6c278bb9ef0..bad9d4881484e 100644 --- a/native/objcexport-header-generator/testData/headers/deprecatedWarningAndError/!deprecatedWarningAndError.h +++ b/native/objcexport-header-generator/testData/headers/deprecatedWarningAndError/!deprecatedWarningAndError.h @@ -20,25 +20,25 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithParam:(int32_t)param __attribute__((swift_name("init(param:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable("message: error-constructor"))); - (instancetype)initWithParamA:(int32_t)paramA paramB:(int32_t)paramB __attribute__((swift_name("init(paramA:paramB:)"))) __attribute__((objc_designated_initializer)) __attribute__((deprecated("message: warning-constructor"))); -- (void)fooError __attribute__((swift_name("fooError()"))) __attribute__((unavailable("message: error"))); -- (void)fooWarning __attribute__((swift_name("fooWarning()"))) __attribute__((deprecated("message: warning"))); -@property int32_t varError __attribute__((swift_name("varError"))) __attribute__((unavailable("message: warning-property"))); -@property int32_t varWarning __attribute__((swift_name("varWarning"))) __attribute__((deprecated("message: warning-property"))); +- (void)fooError __attribute__((unavailable("message: error"))); +- (void)fooWarning __attribute__((deprecated("message: warning"))); +@property int32_t varError __attribute__((unavailable("message: warning-property"))); +@property int32_t varWarning __attribute__((deprecated("message: warning-property"))); @end __attribute__((objc_subclassing_restricted)) @interface FooError : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable("message: error-class"))); +- (instancetype)init __attribute__((objc_designated_initializer)) __attribute__((unavailable("message: error-class"))); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface FooWarning : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((deprecated("message: warning-class"))); +- (instancetype)init __attribute__((objc_designated_initializer)) __attribute__((deprecated("message: warning-class"))); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/dispatchAndExtensionReceiverWithMustBeDocumentedAnnotation/!dispatchAndExtensionReceiverWithMustBeDocumentedAnnotation.h b/native/objcexport-header-generator/testData/headers/dispatchAndExtensionReceiverWithMustBeDocumentedAnnotation/!dispatchAndExtensionReceiverWithMustBeDocumentedAnnotation.h index 31831c32f01e7..b9dc6fe61b5f9 100644 --- a/native/objcexport-header-generator/testData/headers/dispatchAndExtensionReceiverWithMustBeDocumentedAnnotation/!dispatchAndExtensionReceiverWithMustBeDocumentedAnnotation.h +++ b/native/objcexport-header-generator/testData/headers/dispatchAndExtensionReceiverWithMustBeDocumentedAnnotation/!dispatchAndExtensionReceiverWithMustBeDocumentedAnnotation.h @@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN */ __attribute__((objc_subclassing_restricted)) @interface Bar : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** diff --git a/native/objcexport-header-generator/testData/headers/emptyTopLevelFacades/!emptyTopLevelFacades.h b/native/objcexport-header-generator/testData/headers/emptyTopLevelFacades/!emptyTopLevelFacades.h index 364b3871f3b40..1fe6aeb2be0ed 100644 --- a/native/objcexport-header-generator/testData/headers/emptyTopLevelFacades/!emptyTopLevelFacades.h +++ b/native/objcexport-header-generator/testData/headers/emptyTopLevelFacades/!emptyTopLevelFacades.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface PublicClass : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/enumCKeywordsAndSpecialNamesTranslation/!enumCKeywordsAndSpecialNamesTranslation.h b/native/objcexport-header-generator/testData/headers/enumCKeywordsAndSpecialNamesTranslation/!enumCKeywordsAndSpecialNamesTranslation.h index 4c9c8ad2fe910..a57006903544e 100644 --- a/native/objcexport-header-generator/testData/headers/enumCKeywordsAndSpecialNamesTranslation/!enumCKeywordsAndSpecialNamesTranslation.h +++ b/native/objcexport-header-generator/testData/headers/enumCKeywordsAndSpecialNamesTranslation/!enumCKeywordsAndSpecialNamesTranslation.h @@ -29,13 +29,13 @@ NS_ASSUME_NONNULL_BEGIN @interface KotlinEnum : Base - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) KotlinEnumCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) KotlinEnumCompanion *companion; - (int32_t)compareToOther:(E)other __attribute__((swift_name("compareTo(other:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@property (readonly) int32_t ordinal __attribute__((swift_name("ordinal"))); +- (NSUInteger)hash; +- (NSString *)description; +@property (readonly) NSString *name; +@property (readonly) int32_t ordinal; @end __attribute__((objc_subclassing_restricted)) @@ -43,13 +43,13 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) Foo *default_ __attribute__((swift_name("default_"))); -@property (class, readonly) Foo *theAlloc __attribute__((swift_name("theAlloc"))); -@property (class, readonly) Foo *theNew __attribute__((swift_name("theNew"))); -@property (class, readonly) Foo *auto_ __attribute__((swift_name("auto_"))); -@property (class, readonly) Foo *case_ __attribute__((swift_name("case_"))); -+ (KotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@property (class, readonly) Foo *default_; +@property (class, readonly) Foo *theAlloc; +@property (class, readonly) Foo *theNew; +@property (class, readonly) Foo *auto_; +@property (class, readonly) Foo *case_; ++ (KotlinArray *)values; +@property (class, readonly) NSArray *entries; @end __attribute__((objc_subclassing_restricted)) @@ -57,7 +57,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinEnumCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinEnumCompanion *shared; @end __attribute__((objc_subclassing_restricted)) @@ -66,15 +66,15 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/extensionFunctions/!extensionFunctions.h b/native/objcexport-header-generator/testData/headers/extensionFunctions/!extensionFunctions.h index 0139b1546a6b2..8eee398ea00d7 100644 --- a/native/objcexport-header-generator/testData/headers/extensionFunctions/!extensionFunctions.h +++ b/native/objcexport-header-generator/testData/headers/extensionFunctions/!extensionFunctions.h @@ -24,16 +24,16 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface ClazzA : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)memberFun __attribute__((swift_name("memberFun()"))); +- (void)memberFun; @end __attribute__((objc_subclassing_restricted)) @interface ClazzB : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)memberFun __attribute__((swift_name("memberFun()"))); +- (void)memberFun; @end @protocol InterfaceA @@ -47,18 +47,18 @@ __attribute__((objc_subclassing_restricted)) __attribute__((objc_subclassing_restricted)) @interface FooKt : Base + (void)extensionFun:(id)receiver __attribute__((swift_name("extensionFun(_:)"))); -+ (void)topLevelFunA __attribute__((swift_name("topLevelFunA()"))); -+ (void)topLevelFunB __attribute__((swift_name("topLevelFunB()"))); ++ (void)topLevelFunA; ++ (void)topLevelFunB; @end @interface ClazzA (Extensions) -- (void)extensionFunA1 __attribute__((swift_name("extensionFunA1()"))); -- (void)extensionFunA2 __attribute__((swift_name("extensionFunA2()"))); +- (void)extensionFunA1; +- (void)extensionFunA2; @end @interface ClazzB (Extensions) -- (void)extensionFunB1 __attribute__((swift_name("extensionFunB1()"))); -- (void)extensionFunB2 __attribute__((swift_name("extensionFunB2()"))); +- (void)extensionFunB1; +- (void)extensionFunB2; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/extensionOfPrimitiveType/!extensionOfPrimitiveType.h b/native/objcexport-header-generator/testData/headers/extensionOfPrimitiveType/!extensionOfPrimitiveType.h index b792d99c64989..c631e22e2b525 100644 --- a/native/objcexport-header-generator/testData/headers/extensionOfPrimitiveType/!extensionOfPrimitiveType.h +++ b/native/objcexport-header-generator/testData/headers/extensionOfPrimitiveType/!extensionOfPrimitiveType.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (void)bar:(int32_t)receiver __attribute__((swift_name("bar(_:)"))); @end diff --git a/native/objcexport-header-generator/testData/headers/extensionOrder/!extensionOrder.h b/native/objcexport-header-generator/testData/headers/extensionOrder/!extensionOrder.h index aa3ce81610b8c..2a8cbd42920f5 100644 --- a/native/objcexport-header-generator/testData/headers/extensionOrder/!extensionOrder.h +++ b/native/objcexport-header-generator/testData/headers/extensionOrder/!extensionOrder.h @@ -29,31 +29,31 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (int64_t)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (KotlinLongIterator *)iterator __attribute__((swift_name("iterator()"))); +- (KotlinLongIterator *)iterator; - (void)setIndex:(int32_t)index value:(int64_t)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) KotlinLongArray * _Nullable la __attribute__((swift_name("la"))); +@property (class, readonly) KotlinLongArray * _Nullable la; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end @interface KotlinLongIterator : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (Long *)next __attribute__((swift_name("next()"))); -- (int64_t)nextLong __attribute__((swift_name("nextLong()"))); +- (Long *)next; +- (int64_t)nextLong; @end @interface KotlinLongArray (Extensions) -- (void)extFun __attribute__((swift_name("extFun()"))); +- (void)extFun; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/extensionProperties/!extensionProperties.h b/native/objcexport-header-generator/testData/headers/extensionProperties/!extensionProperties.h index 2e6195a761d25..60b6f4281d551 100644 --- a/native/objcexport-header-generator/testData/headers/extensionProperties/!extensionProperties.h +++ b/native/objcexport-header-generator/testData/headers/extensionProperties/!extensionProperties.h @@ -22,22 +22,22 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Clazz : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)memberFun __attribute__((swift_name("memberFun()"))); +- (void)memberFun; @end __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) int32_t topLevelPropA __attribute__((swift_name("topLevelPropA"))); -@property (class, readonly) int32_t topLevelPropB __attribute__((swift_name("topLevelPropB"))); +@property (class, readonly) int32_t topLevelPropA; +@property (class, readonly) int32_t topLevelPropB; @end @interface Clazz (Extensions) -@property (readonly) int32_t extensionValA __attribute__((swift_name("extensionValA"))); -@property (readonly) int32_t extensionValB __attribute__((swift_name("extensionValB"))); -@property int32_t extensionVarA __attribute__((swift_name("extensionVarA"))); -@property int32_t extensionVarB __attribute__((swift_name("extensionVarB"))); +@property (readonly) int32_t extensionValA; +@property (readonly) int32_t extensionValB; +@property int32_t extensionVarA; +@property int32_t extensionVarB; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/extensionsMangling/!extensionsMangling.h b/native/objcexport-header-generator/testData/headers/extensionsMangling/!extensionsMangling.h index 6631e518aeea1..926e84f319590 100644 --- a/native/objcexport-header-generator/testData/headers/extensionsMangling/!extensionsMangling.h +++ b/native/objcexport-header-generator/testData/headers/extensionsMangling/!extensionsMangling.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (Foo *)days:(double)receiver __attribute__((swift_name("days(_:)"))); - (Foo *)days_:(int32_t)receiver __attribute__((swift_name("days(__:)"))); diff --git a/native/objcexport-header-generator/testData/headers/frameworkNameWithObjCNameAndExact/!frameworkNameWithObjCNameAndExact.h b/native/objcexport-header-generator/testData/headers/frameworkNameWithObjCNameAndExact/!frameworkNameWithObjCNameAndExact.h index f4d558f561d0b..706cf0065bb57 100644 --- a/native/objcexport-header-generator/testData/headers/frameworkNameWithObjCNameAndExact/!frameworkNameWithObjCNameAndExact.h +++ b/native/objcexport-header-generator/testData/headers/frameworkNameWithObjCNameAndExact/!frameworkNameWithObjCNameAndExact.h @@ -21,13 +21,13 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("Bar"))) @interface SharedBar : SharedBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface Foo : SharedBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/functionWithErrorType/!functionWithErrorType.h b/native/objcexport-header-generator/testData/headers/functionWithErrorType/!functionWithErrorType.h index c1d98778b4b99..be5df1a5eb2ac 100644 --- a/native/objcexport-header-generator/testData/headers/functionWithErrorType/!functionWithErrorType.h +++ b/native/objcexport-header-generator/testData/headers/functionWithErrorType/!functionWithErrorType.h @@ -22,11 +22,11 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -+ (ERROR *)foo __attribute__((swift_name("foo()"))); ++ (ERROR *)foo; @end @interface ERROR : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/functionWithErrorTypeAndFrameworkName/!functionWithErrorTypeAndFrameworkName.h b/native/objcexport-header-generator/testData/headers/functionWithErrorTypeAndFrameworkName/!functionWithErrorTypeAndFrameworkName.h index 7ff7df3bee0fa..ddc1164de7e68 100644 --- a/native/objcexport-header-generator/testData/headers/functionWithErrorTypeAndFrameworkName/!functionWithErrorTypeAndFrameworkName.h +++ b/native/objcexport-header-generator/testData/headers/functionWithErrorTypeAndFrameworkName/!functionWithErrorTypeAndFrameworkName.h @@ -23,11 +23,11 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("FooKt"))) @interface sharedFooKt : sharedBase -+ (ERROR *)foo __attribute__((swift_name("foo()"))); ++ (ERROR *)foo; @end @interface ERROR : sharedBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/functionWithObjCNameAnnotation/!functionWithObjCNameAnnotation.h b/native/objcexport-header-generator/testData/headers/functionWithObjCNameAnnotation/!functionWithObjCNameAnnotation.h index 5664723071114..5bb2c5bafa310 100644 --- a/native/objcexport-header-generator/testData/headers/functionWithObjCNameAnnotation/!functionWithObjCNameAnnotation.h +++ b/native/objcexport-header-generator/testData/headers/functionWithObjCNameAnnotation/!functionWithObjCNameAnnotation.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (void)objcMemberFunction __attribute__((swift_name("swiftMemberFunction()"))); @end diff --git a/native/objcexport-header-generator/testData/headers/functionWithReservedMethodName/!functionWithReservedMethodName.h b/native/objcexport-header-generator/testData/headers/functionWithReservedMethodName/!functionWithReservedMethodName.h index 9924215bcc664..c61baf6d38eb3 100644 --- a/native/objcexport-header-generator/testData/headers/functionWithReservedMethodName/!functionWithReservedMethodName.h +++ b/native/objcexport-header-generator/testData/headers/functionWithReservedMethodName/!functionWithReservedMethodName.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** diff --git a/native/objcexport-header-generator/testData/headers/functionWithReservedMethodNameAndReturnType/!functionWithReservedMethodNameAndReturnType.h b/native/objcexport-header-generator/testData/headers/functionWithReservedMethodNameAndReturnType/!functionWithReservedMethodNameAndReturnType.h index b872586784303..0363e6ea0f4d5 100644 --- a/native/objcexport-header-generator/testData/headers/functionWithReservedMethodNameAndReturnType/!functionWithReservedMethodNameAndReturnType.h +++ b/native/objcexport-header-generator/testData/headers/functionWithReservedMethodNameAndReturnType/!functionWithReservedMethodNameAndReturnType.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (Foo *)autorelease_ __attribute__((swift_name("autorelease()"))); - (Foo *)class_ __attribute__((swift_name("class()"))); diff --git a/native/objcexport-header-generator/testData/headers/functionWithThrowsAnnotation/!functionWithThrowsAnnotation.h b/native/objcexport-header-generator/testData/headers/functionWithThrowsAnnotation/!functionWithThrowsAnnotation.h index dcb865f509163..43192bc7b07a1 100644 --- a/native/objcexport-header-generator/testData/headers/functionWithThrowsAnnotation/!functionWithThrowsAnnotation.h +++ b/native/objcexport-header-generator/testData/headers/functionWithThrowsAnnotation/!functionWithThrowsAnnotation.h @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN #endif @interface KotlinThrowable : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -33,17 +33,17 @@ NS_ASSUME_NONNULL_BEGIN * @note annotations * kotlin.experimental.ExperimentalNativeApi */ -- (KotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); -- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) KotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); -@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); -- (NSError *)asError __attribute__((swift_name("asError()"))); +- (KotlinArray *)getStackTrace; +- (void)printStackTrace; +- (NSString *)description; +@property (readonly) KotlinThrowable * _Nullable cause; +@property (readonly) NSString * _Nullable message; +- (NSError *)asError; @end __attribute__((objc_subclassing_restricted)) @interface MyError : KotlinThrowable -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); @@ -76,15 +76,15 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/functionsAnnotatedWithObjCName/!functionsAnnotatedWithObjCName.h b/native/objcexport-header-generator/testData/headers/functionsAnnotatedWithObjCName/!functionsAnnotatedWithObjCName.h index bb32145e01e15..fb0c45b8e2ed4 100644 --- a/native/objcexport-header-generator/testData/headers/functionsAnnotatedWithObjCName/!functionsAnnotatedWithObjCName.h +++ b/native/objcexport-header-generator/testData/headers/functionsAnnotatedWithObjCName/!functionsAnnotatedWithObjCName.h @@ -20,8 +20,8 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -+ (NSString *)myKotlinFunctionA __attribute__((swift_name("myKotlinFunctionA()"))); -+ (NSString *)myObjcFunctionB __attribute__((swift_name("myObjcFunctionB()"))); ++ (NSString *)myKotlinFunctionA; ++ (NSString *)myObjcFunctionB; + (NSString *)myObjcFunctionC __attribute__((swift_name("mySwiftFunctionC()"))); @end diff --git a/native/objcexport-header-generator/testData/headers/genericExtensionPropertyIsNotTranslatedAsStaticOne/!genericExtensionPropertyIsNotTranslatedAsStaticOne.h b/native/objcexport-header-generator/testData/headers/genericExtensionPropertyIsNotTranslatedAsStaticOne/!genericExtensionPropertyIsNotTranslatedAsStaticOne.h index 81e41f3a3522d..fc431dcbd120c 100644 --- a/native/objcexport-header-generator/testData/headers/genericExtensionPropertyIsNotTranslatedAsStaticOne/!genericExtensionPropertyIsNotTranslatedAsStaticOne.h +++ b/native/objcexport-header-generator/testData/headers/genericExtensionPropertyIsNotTranslatedAsStaticOne/!genericExtensionPropertyIsNotTranslatedAsStaticOne.h @@ -22,14 +22,14 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (int32_t)extensionProperty:(Bar _Nullable)receiver __attribute__((swift_name("extensionProperty(_:)"))); - (void)extensionFunction:(Bar _Nullable)receiver __attribute__((swift_name("extensionFunction(_:)"))); @end @interface Foo (Extensions) -@property (readonly) int32_t topLevelExtensionProperty __attribute__((swift_name("topLevelExtensionProperty"))); +@property (readonly) int32_t topLevelExtensionProperty; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/genericSuperType/!genericSuperType.h b/native/objcexport-header-generator/testData/headers/genericSuperType/!genericSuperType.h index 00725001d6914..48bef1c8b01fe 100644 --- a/native/objcexport-header-generator/testData/headers/genericSuperType/!genericSuperType.h +++ b/native/objcexport-header-generator/testData/headers/genericSuperType/!genericSuperType.h @@ -21,13 +21,13 @@ NS_ASSUME_NONNULL_BEGIN #endif @interface Element : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -+ (Element *)getKey __attribute__((swift_name("getKey()"))); ++ (Element *)getKey; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/illegalStateException/!illegalStateException.h b/native/objcexport-header-generator/testData/headers/illegalStateException/!illegalStateException.h index 7a5342706d546..a954b0c8eecde 100644 --- a/native/objcexport-header-generator/testData/headers/illegalStateException/!illegalStateException.h +++ b/native/objcexport-header-generator/testData/headers/illegalStateException/!illegalStateException.h @@ -24,11 +24,11 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) KotlinIllegalStateException * _Nullable exception __attribute__((swift_name("exception"))); +@property (class, readonly) KotlinIllegalStateException * _Nullable exception; @end @interface KotlinThrowable : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -38,16 +38,16 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlin.experimental.ExperimentalNativeApi */ -- (KotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); -- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) KotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); -@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); -- (NSError *)asError __attribute__((swift_name("asError()"))); +- (KotlinArray *)getStackTrace; +- (void)printStackTrace; +- (NSString *)description; +@property (readonly) KotlinThrowable * _Nullable cause; +@property (readonly) NSString * _Nullable message; +- (NSError *)asError; @end @interface KotlinException : KotlinThrowable -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -55,7 +55,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface KotlinRuntimeException : KotlinException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -63,7 +63,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface KotlinIllegalStateException : KotlinRuntimeException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -76,15 +76,15 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/innerClass/!innerClass.h b/native/objcexport-header-generator/testData/headers/innerClass/!innerClass.h index 46b320115febc..7cc96f87f50fe 100644 --- a/native/objcexport-header-generator/testData/headers/innerClass/!innerClass.h +++ b/native/objcexport-header-generator/testData/headers/innerClass/!innerClass.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/innerClassWithExtensionFunction/!innerClassWithExtensionFunction.h b/native/objcexport-header-generator/testData/headers/innerClassWithExtensionFunction/!innerClassWithExtensionFunction.h index 308734c44dfe4..00271eeeb84d7 100644 --- a/native/objcexport-header-generator/testData/headers/innerClassWithExtensionFunction/!innerClassWithExtensionFunction.h +++ b/native/objcexport-header-generator/testData/headers/innerClassWithExtensionFunction/!innerClassWithExtensionFunction.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/interfaceExtension/!interfaceExtension.h b/native/objcexport-header-generator/testData/headers/interfaceExtension/!interfaceExtension.h index 71c1368f6d950..eaac44899da04 100644 --- a/native/objcexport-header-generator/testData/headers/interfaceExtension/!interfaceExtension.h +++ b/native/objcexport-header-generator/testData/headers/interfaceExtension/!interfaceExtension.h @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooClass : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end @@ -38,7 +38,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface FooClass (Extensions) -- (void)bar __attribute__((swift_name("bar()"))); +- (void)bar; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/interfaceImplementingInterface/!interfaceImplementingInterface.h b/native/objcexport-header-generator/testData/headers/interfaceImplementingInterface/!interfaceImplementingInterface.h index 8de552264c048..8a7bb396b02fa 100644 --- a/native/objcexport-header-generator/testData/headers/interfaceImplementingInterface/!interfaceImplementingInterface.h +++ b/native/objcexport-header-generator/testData/headers/interfaceImplementingInterface/!interfaceImplementingInterface.h @@ -22,9 +22,9 @@ NS_ASSUME_NONNULL_BEGIN @protocol Foo @required -- (id)someMethod __attribute__((swift_name("someMethod()"))); -- (id)someMethodWithCovariantOverwrite __attribute__((swift_name("someMethodWithCovariantOverwrite()"))); -@property (readonly) int32_t someProperty __attribute__((swift_name("someProperty"))); +- (id)someMethod; +- (id)someMethodWithCovariantOverwrite; +@property (readonly) int32_t someProperty; @end @protocol Bar diff --git a/native/objcexport-header-generator/testData/headers/interfaceReferencingOtherInterfaceAsReturnType/!interfaceReferencingOtherInterfaceAsReturnType.h b/native/objcexport-header-generator/testData/headers/interfaceReferencingOtherInterfaceAsReturnType/!interfaceReferencingOtherInterfaceAsReturnType.h index b0df59f47918d..dff677b3115ad 100644 --- a/native/objcexport-header-generator/testData/headers/interfaceReferencingOtherInterfaceAsReturnType/!interfaceReferencingOtherInterfaceAsReturnType.h +++ b/native/objcexport-header-generator/testData/headers/interfaceReferencingOtherInterfaceAsReturnType/!interfaceReferencingOtherInterfaceAsReturnType.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol A @required -- (id)foo __attribute__((swift_name("foo()"))); +- (id)foo; @end @protocol B diff --git a/native/objcexport-header-generator/testData/headers/internalPublicApi/!internalPublicApi.h b/native/objcexport-header-generator/testData/headers/internalPublicApi/!internalPublicApi.h index de49ff43bf217..548dbdcba865e 100644 --- a/native/objcexport-header-generator/testData/headers/internalPublicApi/!internalPublicApi.h +++ b/native/objcexport-header-generator/testData/headers/internalPublicApi/!internalPublicApi.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) int32_t publicVal __attribute__((swift_name("publicVal"))); +@property (class, readonly) int32_t publicVal; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/kdocWithBlockTags/!kdocWithBlockTags.h b/native/objcexport-header-generator/testData/headers/kdocWithBlockTags/!kdocWithBlockTags.h index 2c2df8a7b6a61..cccfe62f01092 100644 --- a/native/objcexport-header-generator/testData/headers/kdocWithBlockTags/!kdocWithBlockTags.h +++ b/native/objcexport-header-generator/testData/headers/kdocWithBlockTags/!kdocWithBlockTags.h @@ -29,34 +29,34 @@ NS_ASSUME_NONNULL_BEGIN */ __attribute__((objc_subclassing_restricted)) @interface KDocExport : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** Non-primary ctor KDoc:*/ - (instancetype)initWithName:(NSString *)name __attribute__((swift_name("init(name:)"))) __attribute__((objc_designated_initializer)); /** @property xyzzy KDoc for foo?*/ -@property (readonly) NSString *foo __attribute__((swift_name("foo"))); +@property (readonly) NSString *foo; /** * @param xyzzy is documented. * * This is multi-line KDoc. See a blank line above. */ -@property (readonly) NSString *xyzzy __attribute__((swift_name("xyzzy"))); +@property (readonly) NSString *xyzzy; /** @property foo KDoc for yxxyz?*/ -@property int32_t yxxyz __attribute__((swift_name("yxxyz"))); +@property int32_t yxxyz; @end @interface SomeClassWithProperty : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); /** * Kdoc for a property */ -@property (readonly) SomeClassWithProperty *heavyFormattedKDocFoo __attribute__((swift_name("heavyFormattedKDocFoo"))); +@property (readonly) SomeClassWithProperty *heavyFormattedKDocFoo; @end __attribute__((objc_subclassing_restricted)) diff --git a/native/objcexport-header-generator/testData/headers/kotlinUnitIsForwarded/!kotlinUnitIsForwarded.h b/native/objcexport-header-generator/testData/headers/kotlinUnitIsForwarded/!kotlinUnitIsForwarded.h index bb94d2e014a38..a7cd770c5ef63 100644 --- a/native/objcexport-header-generator/testData/headers/kotlinUnitIsForwarded/!kotlinUnitIsForwarded.h +++ b/native/objcexport-header-generator/testData/headers/kotlinUnitIsForwarded/!kotlinUnitIsForwarded.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) KotlinUnit *(^(^foo)(NSString *))(Boolean *) __attribute__((swift_name("foo"))); +@property (class, readonly) KotlinUnit *(^(^foo)(NSString *))(Boolean *); @end __attribute__((objc_subclassing_restricted)) @@ -30,8 +30,8 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)unit __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinUnit *shared __attribute__((swift_name("shared"))); -- (NSString *)description __attribute__((swift_name("description()"))); +@property (class, readonly, getter=shared) KotlinUnit *shared; +- (NSString *)description; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/mangleGenerics/!mangleGenerics.h b/native/objcexport-header-generator/testData/headers/mangleGenerics/!mangleGenerics.h index 9ca9f5be44b0b..0da5c462320ee 100644 --- a/native/objcexport-header-generator/testData/headers/mangleGenerics/!mangleGenerics.h +++ b/native/objcexport-header-generator/testData/headers/mangleGenerics/!mangleGenerics.h @@ -31,48 +31,48 @@ __attribute__((objc_subclassing_restricted)) - (Base_ _Nullable)propertyExtension:(Base_ _Nullable)receiver __attribute__((swift_name("propertyExtension(_:)"))); - (Base_ _Nullable)methodBase1:(Base_ _Nullable)base1 base2:(Base_ _Nullable)base2 base3:(Base_ _Nullable)base3 __attribute__((swift_name("method(base1:base2:base3:)"))); - (void)methodExtension:(Base_ _Nullable)receiver __attribute__((swift_name("methodExtension(_:)"))); -@property (readonly) Base_ _Nullable property __attribute__((swift_name("property"))); +@property (readonly) Base_ _Nullable property; @end __attribute__((objc_subclassing_restricted)) @interface BooleanType : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface MutableSetType : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface NSCopyingType : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface NSErrorType : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface NSObjectType : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface TType : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface doubleType : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/mangleInitConstructors/!mangleInitConstructors.h b/native/objcexport-header-generator/testData/headers/mangleInitConstructors/!mangleInitConstructors.h index 9125a25291122..c768a9f9bbf52 100644 --- a/native/objcexport-header-generator/testData/headers/mangleInitConstructors/!mangleInitConstructors.h +++ b/native/objcexport-header-generator/testData/headers/mangleInitConstructors/!mangleInitConstructors.h @@ -23,7 +23,7 @@ __attribute__((objc_subclassing_restricted)) - (instancetype)initWithParam:(BOOL)param __attribute__((swift_name("init(param:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithParam_:(int32_t)param __attribute__((swift_name("init(param_:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithParam__:(NSString *)param __attribute__((swift_name("init(param__:)"))) __attribute__((objc_designated_initializer)); -@property (readonly) NSString *param __attribute__((swift_name("param"))); +@property (readonly) NSString *param; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/mangleProperty/!mangleProperty.h b/native/objcexport-header-generator/testData/headers/mangleProperty/!mangleProperty.h index 185ce14a897ee..e865bf539b455 100644 --- a/native/objcexport-header-generator/testData/headers/mangleProperty/!mangleProperty.h +++ b/native/objcexport-header-generator/testData/headers/mangleProperty/!mangleProperty.h @@ -20,10 +20,10 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)bar __attribute__((swift_name("bar()"))); -@property (readonly, getter=bar_) int32_t bar __attribute__((swift_name("bar"))); +- (void)bar; +@property (readonly, getter=bar_) int32_t bar; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/mangleThrowsAnnotation/!mangleThrowsAnnotation.h b/native/objcexport-header-generator/testData/headers/mangleThrowsAnnotation/!mangleThrowsAnnotation.h index e411f3c282e9f..0cb62854b104c 100644 --- a/native/objcexport-header-generator/testData/headers/mangleThrowsAnnotation/!mangleThrowsAnnotation.h +++ b/native/objcexport-header-generator/testData/headers/mangleThrowsAnnotation/!mangleThrowsAnnotation.h @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN #endif @interface KotlinThrowable : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -33,17 +33,17 @@ NS_ASSUME_NONNULL_BEGIN * @note annotations * kotlin.experimental.ExperimentalNativeApi */ -- (KotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); -- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) KotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); -@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); -- (NSError *)asError __attribute__((swift_name("asError()"))); +- (KotlinArray *)getStackTrace; +- (void)printStackTrace; +- (NSString *)description; +@property (readonly) KotlinThrowable * _Nullable cause; +@property (readonly) NSString * _Nullable message; +- (NSError *)asError; @end __attribute__((objc_subclassing_restricted)) @interface IOException : KotlinThrowable -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); @@ -72,15 +72,15 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/manyClassesAndInterfaces/!manyClassesAndInterfaces.h b/native/objcexport-header-generator/testData/headers/manyClassesAndInterfaces/!manyClassesAndInterfaces.h index 3060fe83b74c5..3432477916a1d 100644 --- a/native/objcexport-header-generator/testData/headers/manyClassesAndInterfaces/!manyClassesAndInterfaces.h +++ b/native/objcexport-header-generator/testData/headers/manyClassesAndInterfaces/!manyClassesAndInterfaces.h @@ -24,37 +24,37 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface A1 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface A2 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface A3 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface B1 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface B2 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface B3 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/memberFunctionSignatureOrder/!memberFunctionSignatureOrder.h b/native/objcexport-header-generator/testData/headers/memberFunctionSignatureOrder/!memberFunctionSignatureOrder.h index 163b3cee97801..8941d0ec12b2b 100644 --- a/native/objcexport-header-generator/testData/headers/memberFunctionSignatureOrder/!memberFunctionSignatureOrder.h +++ b/native/objcexport-header-generator/testData/headers/memberFunctionSignatureOrder/!memberFunctionSignatureOrder.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (void)fooA:(NSString *)a b:(int32_t)b __attribute__((swift_name("foo(a:b:)"))); - (void)fooB:(NSString *)b a:(NSString *)a __attribute__((swift_name("foo(b:a:)"))); diff --git a/native/objcexport-header-generator/testData/headers/methodWithMultipleTypeParameters/!methodWithMultipleTypeParameters.h b/native/objcexport-header-generator/testData/headers/methodWithMultipleTypeParameters/!methodWithMultipleTypeParameters.h index f3b354c60bd82..56d5fc7d5bba5 100644 --- a/native/objcexport-header-generator/testData/headers/methodWithMultipleTypeParameters/!methodWithMultipleTypeParameters.h +++ b/native/objcexport-header-generator/testData/headers/methodWithMultipleTypeParameters/!methodWithMultipleTypeParameters.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (id)barA:(id)a __attribute__((swift_name("bar(a:)"))); - (id)barB:(id)b __attribute__((swift_name("bar(b:)"))); diff --git a/native/objcexport-header-generator/testData/headers/methodWithMultipleUpperBoundsParameters/!methodWithMultipleUpperBoundsParameters.h b/native/objcexport-header-generator/testData/headers/methodWithMultipleUpperBoundsParameters/!methodWithMultipleUpperBoundsParameters.h index e67cdabf39b43..b9a060e51515e 100644 --- a/native/objcexport-header-generator/testData/headers/methodWithMultipleUpperBoundsParameters/!methodWithMultipleUpperBoundsParameters.h +++ b/native/objcexport-header-generator/testData/headers/methodWithMultipleUpperBoundsParameters/!methodWithMultipleUpperBoundsParameters.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (void)barT:(id)t __attribute__((swift_name("bar(t:)"))); @end diff --git a/native/objcexport-header-generator/testData/headers/multipleInheritance/!multipleInheritance.h b/native/objcexport-header-generator/testData/headers/multipleInheritance/!multipleInheritance.h index 69fd47cc048be..f260c8696efbe 100644 --- a/native/objcexport-header-generator/testData/headers/multipleInheritance/!multipleInheritance.h +++ b/native/objcexport-header-generator/testData/headers/multipleInheritance/!multipleInheritance.h @@ -31,25 +31,25 @@ NS_ASSUME_NONNULL_BEGIN /** * inheritance chain: A > B > C */ -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); /** * inheritance chain: A > B > C */ + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (T _Nullable)foo __attribute__((swift_name("foo()"))); +- (T _Nullable)foo; @end @interface B : A -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (Int *)foo __attribute__((swift_name("foo()"))); +- (Int *)foo; @end @interface C : B -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (Int *)foo __attribute__((swift_name("foo()"))); +- (Int *)foo; @end @@ -61,20 +61,20 @@ NS_ASSUME_NONNULL_BEGIN */ @protocol RootA @required -- (id _Nullable)fooA __attribute__((swift_name("fooA()"))); +- (id _Nullable)fooA; @end @protocol RootB @required -- (id _Nullable)fooB __attribute__((swift_name("fooB()"))); +- (id _Nullable)fooB; @end __attribute__((objc_subclassing_restricted)) @interface Tree : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (Int *)fooA __attribute__((swift_name("fooA()"))); -- (NSString *)fooB __attribute__((swift_name("fooB()"))); +- (Int *)fooA; +- (NSString *)fooB; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/multipleInterfacesImplementationChain/!multipleInterfacesImplementationChain.h b/native/objcexport-header-generator/testData/headers/multipleInterfacesImplementationChain/!multipleInterfacesImplementationChain.h index be865f094471e..d52908a340752 100644 --- a/native/objcexport-header-generator/testData/headers/multipleInterfacesImplementationChain/!multipleInterfacesImplementationChain.h +++ b/native/objcexport-header-generator/testData/headers/multipleInterfacesImplementationChain/!multipleInterfacesImplementationChain.h @@ -22,16 +22,16 @@ NS_ASSUME_NONNULL_BEGIN @protocol A @required -- (id)funA __attribute__((swift_name("funA()"))); -- (id)funAForOverride __attribute__((swift_name("funAForOverride()"))); -@property (readonly) int32_t propertyA __attribute__((swift_name("propertyA"))); -@property (readonly) int32_t propertyAForOverride __attribute__((swift_name("propertyAForOverride"))); +- (id)funA; +- (id)funAForOverride; +@property (readonly) int32_t propertyA; +@property (readonly) int32_t propertyAForOverride; @end @protocol B @required -- (void)funB __attribute__((swift_name("funB()"))); -@property (readonly) BOOL propertyB __attribute__((swift_name("propertyB"))); +- (void)funB; +@property (readonly) BOOL propertyB; @end @protocol C diff --git a/native/objcexport-header-generator/testData/headers/nestedClass/!nestedClass.h b/native/objcexport-header-generator/testData/headers/nestedClass/!nestedClass.h index 54bc5a3dbed6f..0ee9f1e9ee24e 100644 --- a/native/objcexport-header-generator/testData/headers/nestedClass/!nestedClass.h +++ b/native/objcexport-header-generator/testData/headers/nestedClass/!nestedClass.h @@ -20,35 +20,35 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface A : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("A.A1"))) @interface AA1 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("A.A1B1"))) @interface AA1B1 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("A.A2"))) @interface AA2 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("A.A2B2"))) @interface AA2B2 : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/nestedClassWithFrameworkName/!nestedClassWithFrameworkName.h b/native/objcexport-header-generator/testData/headers/nestedClassWithFrameworkName/!nestedClassWithFrameworkName.h index 1026fa440f6cc..6b9fd12d57ac4 100644 --- a/native/objcexport-header-generator/testData/headers/nestedClassWithFrameworkName/!nestedClassWithFrameworkName.h +++ b/native/objcexport-header-generator/testData/headers/nestedClassWithFrameworkName/!nestedClassWithFrameworkName.h @@ -21,35 +21,35 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("A"))) @interface SharedA : SharedBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("A.A1"))) @interface SharedAA1 : SharedBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("A.A1B1"))) @interface SharedAA1B1 : SharedBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("A.A2"))) @interface SharedAA2 : SharedBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) __attribute__((swift_name("A.A2B2"))) @interface SharedAA2B2 : SharedBase -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/nestedGenericClass/!nestedGenericClass.h b/native/objcexport-header-generator/testData/headers/nestedGenericClass/!nestedGenericClass.h index 9bf215b19e75f..9a12f453d2f15 100644 --- a/native/objcexport-header-generator/testData/headers/nestedGenericClass/!nestedGenericClass.h +++ b/native/objcexport-header-generator/testData/headers/nestedGenericClass/!nestedGenericClass.h @@ -20,19 +20,19 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface A : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface AB : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface ABC : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/nothing/!nothing.h b/native/objcexport-header-generator/testData/headers/nothing/!nothing.h index 891ef24eaeb4c..5eceead8ec383 100644 --- a/native/objcexport-header-generator/testData/headers/nothing/!nothing.h +++ b/native/objcexport-header-generator/testData/headers/nothing/!nothing.h @@ -23,15 +23,15 @@ NS_ASSUME_NONNULL_BEGIN @protocol NothingCases @required - (void)nonNullExtension:(KotlinNothing *)receiver __attribute__((swift_name("nonNullExtension(_:)"))); -- (void)nonNullMethod __attribute__((swift_name("nonNullMethod()"))); +- (void)nonNullMethod; - (void)nonNullParamNothing:(KotlinNothing *)nothing __attribute__((swift_name("nonNullParam(nothing:)"))); - (void)nullExtension:(KotlinNothing *)receiver __attribute__((swift_name("nullExtension(_:)"))); -- (KotlinNothing * _Nullable)nullMethod __attribute__((swift_name("nullMethod()"))); +- (KotlinNothing * _Nullable)nullMethod; - (void)nullParamNothing:(KotlinNothing * _Nullable)nothing __attribute__((swift_name("nullParam(nothing:)"))); -@property (readonly) KotlinNothing *nonNullVal __attribute__((swift_name("nonNullVal"))); -@property KotlinNothing *nonNullVar __attribute__((swift_name("nonNullVar"))); -@property (readonly) KotlinNothing * _Nullable nullVal __attribute__((swift_name("nullVal"))); -@property KotlinNothing * _Nullable nullVar __attribute__((swift_name("nullVar"))); +@property (readonly) KotlinNothing *nonNullVal; +@property KotlinNothing *nonNullVar; +@property (readonly) KotlinNothing * _Nullable nullVal; +@property KotlinNothing * _Nullable nullVar; @end __attribute__((objc_subclassing_restricted)) diff --git a/native/objcexport-header-generator/testData/headers/nullableFunctionalTypeArgumentsAndReturnTypesTranslated/!nullableFunctionalTypeArgumentsAndReturnTypesTranslated.h b/native/objcexport-header-generator/testData/headers/nullableFunctionalTypeArgumentsAndReturnTypesTranslated/!nullableFunctionalTypeArgumentsAndReturnTypesTranslated.h index 69e6608b7aa62..629bfc94005a9 100644 --- a/native/objcexport-header-generator/testData/headers/nullableFunctionalTypeArgumentsAndReturnTypesTranslated/!nullableFunctionalTypeArgumentsAndReturnTypesTranslated.h +++ b/native/objcexport-header-generator/testData/headers/nullableFunctionalTypeArgumentsAndReturnTypesTranslated/!nullableFunctionalTypeArgumentsAndReturnTypesTranslated.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol Foo @required -@property (readonly) id (^ _Nullable func)(id parameterType) __attribute__((swift_name("func"))); +@property (readonly) id (^ _Nullable func)(id parameterType); @end @protocol ParameterType diff --git a/native/objcexport-header-generator/testData/headers/objCEntryPoints/!objCEntryPoints.h b/native/objcexport-header-generator/testData/headers/objCEntryPoints/!objCEntryPoints.h index 9bc08ae69a06d..f4fddaa724040 100644 --- a/native/objcexport-header-generator/testData/headers/objCEntryPoints/!objCEntryPoints.h +++ b/native/objcexport-header-generator/testData/headers/objCEntryPoints/!objCEntryPoints.h @@ -20,27 +20,27 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Constructor : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithI:(int32_t)i __attribute__((swift_name("init(i:)"))) __attribute__((objc_designated_initializer)); @end __attribute__((objc_subclassing_restricted)) @interface ExplicitCallable : Base -- (int32_t)entryPoint __attribute__((swift_name("entryPoint()"))); +- (int32_t)entryPoint; - (int32_t)entryPointI:(int32_t)i __attribute__((swift_name("entryPoint(i:)"))); -@property (readonly, getter=entryPoint_) int32_t entryPoint __attribute__((swift_name("entryPoint"))); +@property (readonly, getter=entryPoint_) int32_t entryPoint; @end __attribute__((objc_subclassing_restricted)) @interface ExplicitFunction : Base -- (int32_t)entryPoint __attribute__((swift_name("entryPoint()"))); +- (int32_t)entryPoint; - (int32_t)entryPointI:(int32_t)i __attribute__((swift_name("entryPoint(i:)"))); @end __attribute__((objc_subclassing_restricted)) @interface ExplicitProperty : Base -@property (readonly) int32_t entryPoint __attribute__((swift_name("entryPoint"))); +@property (readonly) int32_t entryPoint; @end __attribute__((objc_subclassing_restricted)) @@ -49,30 +49,30 @@ __attribute__((objc_subclassing_restricted)) __attribute__((objc_subclassing_restricted)) @interface WildcardCallable : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithI:(int32_t)i __attribute__((swift_name("init(i:)"))) __attribute__((objc_designated_initializer)); -- (int32_t)entryPoint1 __attribute__((swift_name("entryPoint1()"))); +- (int32_t)entryPoint1; - (int32_t)entryPoint1I:(int32_t)i __attribute__((swift_name("entryPoint1(i:)"))); -- (int32_t)entryPoint2 __attribute__((swift_name("entryPoint2()"))); -@property (getter=entryPoint1_) int32_t entryPoint1 __attribute__((swift_name("entryPoint1"))); -@property (getter=entryPoint2_) int32_t entryPoint2 __attribute__((swift_name("entryPoint2"))); +- (int32_t)entryPoint2; +@property (getter=entryPoint1_) int32_t entryPoint1; +@property (getter=entryPoint2_) int32_t entryPoint2; @end __attribute__((objc_subclassing_restricted)) @interface WildcardFunction : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithI:(int32_t)i __attribute__((swift_name("init(i:)"))) __attribute__((objc_designated_initializer)); -- (int32_t)entryPoint1 __attribute__((swift_name("entryPoint1()"))); +- (int32_t)entryPoint1; - (int32_t)entryPoint1I:(int32_t)i __attribute__((swift_name("entryPoint1(i:)"))); -- (int32_t)entryPoint2 __attribute__((swift_name("entryPoint2()"))); +- (int32_t)entryPoint2; @end __attribute__((objc_subclassing_restricted)) @interface WildcardProperty : Base -@property (readonly) int32_t entryPoint1 __attribute__((swift_name("entryPoint1"))); -@property (readonly) int32_t entryPoint2 __attribute__((swift_name("entryPoint2"))); +@property (readonly) int32_t entryPoint1; +@property (readonly) int32_t entryPoint2; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/objectWithGenericSuperclass/!objectWithGenericSuperclass.h b/native/objcexport-header-generator/testData/headers/objectWithGenericSuperclass/!objectWithGenericSuperclass.h index c5908c62576c0..c6553e7e6628b 100644 --- a/native/objcexport-header-generator/testData/headers/objectWithGenericSuperclass/!objectWithGenericSuperclass.h +++ b/native/objcexport-header-generator/testData/headers/objectWithGenericSuperclass/!objectWithGenericSuperclass.h @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN #endif @interface A : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end @@ -35,10 +35,10 @@ __attribute__((objc_subclassing_restricted)) @interface Foo : A + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); +- (instancetype)init __attribute__((objc_designated_initializer)) __attribute__((unavailable)); + (instancetype)new __attribute__((unavailable)); + (instancetype)foo __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) Foo *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) Foo *shared; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/objectWithReservedName/!objectWithReservedName.h b/native/objcexport-header-generator/testData/headers/objectWithReservedName/!objectWithReservedName.h index 4c31b9858a936..e95092349aaf5 100644 --- a/native/objcexport-header-generator/testData/headers/objectWithReservedName/!objectWithReservedName.h +++ b/native/objcexport-header-generator/testData/headers/objectWithReservedName/!objectWithReservedName.h @@ -25,7 +25,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)getAlloc __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) alloc *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) alloc *shared; @end __attribute__((objc_subclassing_restricted)) @@ -33,7 +33,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)autorelease_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) autorelease *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) autorelease *shared; @end __attribute__((objc_subclassing_restricted)) @@ -41,7 +41,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)class_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) class *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) class *shared; @end __attribute__((objc_subclassing_restricted)) @@ -49,7 +49,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)classFallbacksForKeyedArchiver_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) classFallbacksForKeyedArchiver *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) classFallbacksForKeyedArchiver *shared; @end __attribute__((objc_subclassing_restricted)) @@ -57,7 +57,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)classForKeyedUnarchiver_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) classForKeyedUnarchiver *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) classForKeyedUnarchiver *shared; @end __attribute__((objc_subclassing_restricted)) @@ -65,7 +65,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)debugDescription_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) debugDescription *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) debugDescription *shared; @end __attribute__((objc_subclassing_restricted)) @@ -73,7 +73,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)description_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) description *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) description *shared; @end __attribute__((objc_subclassing_restricted)) @@ -81,7 +81,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)hash_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) hash *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) hash *shared; @end __attribute__((objc_subclassing_restricted)) @@ -89,7 +89,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)initialize_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) initialize *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) initialize *shared; @end __attribute__((objc_subclassing_restricted)) @@ -97,7 +97,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)load_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) load *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) load *shared; @end __attribute__((objc_subclassing_restricted)) @@ -105,7 +105,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)getNew __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) new *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) new *shared; @end __attribute__((objc_subclassing_restricted)) @@ -113,7 +113,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)release_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) release *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) release *shared; @end __attribute__((objc_subclassing_restricted)) @@ -121,7 +121,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)retain_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) retain *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) retain *shared; @end __attribute__((objc_subclassing_restricted)) @@ -129,7 +129,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)superclass_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) superclass *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) superclass *shared; @end __attribute__((objc_subclassing_restricted)) @@ -137,7 +137,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)useStoredAccessor_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) useStoredAccessor *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) useStoredAccessor *shared; @end __attribute__((objc_subclassing_restricted)) @@ -145,7 +145,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)version_ __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) version *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) version *shared; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/parameterWithMustBeDocumentedAnnotation/!parameterWithMustBeDocumentedAnnotation.h b/native/objcexport-header-generator/testData/headers/parameterWithMustBeDocumentedAnnotation/!parameterWithMustBeDocumentedAnnotation.h index e33687145ae1f..d946a1bce038d 100644 --- a/native/objcexport-header-generator/testData/headers/parameterWithMustBeDocumentedAnnotation/!parameterWithMustBeDocumentedAnnotation.h +++ b/native/objcexport-header-generator/testData/headers/parameterWithMustBeDocumentedAnnotation/!parameterWithMustBeDocumentedAnnotation.h @@ -25,7 +25,7 @@ __attribute__((objc_subclassing_restricted)) * @param myPrameter annotations ImportantAnnotation */ - (instancetype)initWithMyPrameter:(NSString *)myPrameter __attribute__((swift_name("init(myPrameter:)"))) __attribute__((objc_designated_initializer)); -@property (readonly) NSString *myPrameter __attribute__((swift_name("myPrameter"))); +@property (readonly) NSString *myPrameter; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/privateCompanion/!privateCompanion.h b/native/objcexport-header-generator/testData/headers/privateCompanion/!privateCompanion.h index bbd846afbc938..2bd931e04d0d1 100644 --- a/native/objcexport-header-generator/testData/headers/privateCompanion/!privateCompanion.h +++ b/native/objcexport-header-generator/testData/headers/privateCompanion/!privateCompanion.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end diff --git a/native/objcexport-header-generator/testData/headers/privateGenericSuperInterface/!privateGenericSuperInterface.h b/native/objcexport-header-generator/testData/headers/privateGenericSuperInterface/!privateGenericSuperInterface.h index d68c01ef40ef8..9f7c8ae95ddab 100644 --- a/native/objcexport-header-generator/testData/headers/privateGenericSuperInterface/!privateGenericSuperInterface.h +++ b/native/objcexport-header-generator/testData/headers/privateGenericSuperInterface/!privateGenericSuperInterface.h @@ -20,9 +20,9 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface PublicClass : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (int32_t)foo __attribute__((swift_name("foo()"))); +- (int32_t)foo; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/privateSuperInterface/!privateSuperInterface.h b/native/objcexport-header-generator/testData/headers/privateSuperInterface/!privateSuperInterface.h index b94e85ddd9c89..c6095d3961bc6 100644 --- a/native/objcexport-header-generator/testData/headers/privateSuperInterface/!privateSuperInterface.h +++ b/native/objcexport-header-generator/testData/headers/privateSuperInterface/!privateSuperInterface.h @@ -20,9 +20,9 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface PublicB : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)foo __attribute__((swift_name("foo()"))); +- (void)foo; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/privateSuperInterfaceWithCovariantOverride/!privateSuperInterfaceWithCovariantOverride.h b/native/objcexport-header-generator/testData/headers/privateSuperInterfaceWithCovariantOverride/!privateSuperInterfaceWithCovariantOverride.h index b3798fa599103..877a45afa725d 100644 --- a/native/objcexport-header-generator/testData/headers/privateSuperInterfaceWithCovariantOverride/!privateSuperInterfaceWithCovariantOverride.h +++ b/native/objcexport-header-generator/testData/headers/privateSuperInterfaceWithCovariantOverride/!privateSuperInterfaceWithCovariantOverride.h @@ -20,9 +20,9 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface PublicB : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (NSString *)foo __attribute__((swift_name("foo()"))); +- (NSString *)foo; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/privateTopLevelClassProperty/!privateTopLevelClassProperty.h b/native/objcexport-header-generator/testData/headers/privateTopLevelClassProperty/!privateTopLevelClassProperty.h index 98df8a1ff9121..5917e3dc77ec4 100644 --- a/native/objcexport-header-generator/testData/headers/privateTopLevelClassProperty/!privateTopLevelClassProperty.h +++ b/native/objcexport-header-generator/testData/headers/privateTopLevelClassProperty/!privateTopLevelClassProperty.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) id privateClass __attribute__((swift_name("privateClass"))); +@property (class, readonly) id privateClass; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/propertiesAnnotatedWithObjCName/!propertiesAnnotatedWithObjCName.h b/native/objcexport-header-generator/testData/headers/propertiesAnnotatedWithObjCName/!propertiesAnnotatedWithObjCName.h index bb6037259a8d7..fa6fba5556055 100644 --- a/native/objcexport-header-generator/testData/headers/propertiesAnnotatedWithObjCName/!propertiesAnnotatedWithObjCName.h +++ b/native/objcexport-header-generator/testData/headers/propertiesAnnotatedWithObjCName/!propertiesAnnotatedWithObjCName.h @@ -20,10 +20,10 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (readonly) int32_t prop __attribute__((swift_name("prop"))); -@property (readonly) int32_t objCName __attribute__((swift_name("objCName"))); +@property (readonly) int32_t prop; +@property (readonly) int32_t objCName; @property (readonly) int32_t objCNameWithSwiftName __attribute__((swift_name("swiftNameWithObjCName"))); @end diff --git a/native/objcexport-header-generator/testData/headers/propertyGetter/!propertyGetter.h b/native/objcexport-header-generator/testData/headers/propertyGetter/!propertyGetter.h index a61da74452d84..90a9a78f5193d 100644 --- a/native/objcexport-header-generator/testData/headers/propertyGetter/!propertyGetter.h +++ b/native/objcexport-header-generator/testData/headers/propertyGetter/!propertyGetter.h @@ -22,12 +22,12 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end @interface Foo (Extensions) -@property (readonly, getter=double) double double_ __attribute__((swift_name("double_"))); +@property (readonly, getter=double) double double_; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/releaseKeywordAsMethodName/!releaseKeywordAsMethodName.h b/native/objcexport-header-generator/testData/headers/releaseKeywordAsMethodName/!releaseKeywordAsMethodName.h index 85db8e0408f27..e1d574a8d203a 100644 --- a/native/objcexport-header-generator/testData/headers/releaseKeywordAsMethodName/!releaseKeywordAsMethodName.h +++ b/native/objcexport-header-generator/testData/headers/releaseKeywordAsMethodName/!releaseKeywordAsMethodName.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface MutexPool : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (void)release_ __attribute__((swift_name("release()"))); - (void)releaseParam:(int32_t)param __attribute__((swift_name("release(param:)"))); diff --git a/native/objcexport-header-generator/testData/headers/samInterface/!samInterface.h b/native/objcexport-header-generator/testData/headers/samInterface/!samInterface.h index b8fbe358cb433..2852405475746 100644 --- a/native/objcexport-header-generator/testData/headers/samInterface/!samInterface.h +++ b/native/objcexport-header-generator/testData/headers/samInterface/!samInterface.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol Foo @required -- (void)invoke __attribute__((swift_name("invoke()"))); +- (void)invoke; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/sameClassNameInDifferentPackage/!sameClassNameInDifferentPackage.h b/native/objcexport-header-generator/testData/headers/sameClassNameInDifferentPackage/!sameClassNameInDifferentPackage.h index 78d0f7fa00779..b4a5cb5663766 100644 --- a/native/objcexport-header-generator/testData/headers/sameClassNameInDifferentPackage/!sameClassNameInDifferentPackage.h +++ b/native/objcexport-header-generator/testData/headers/sameClassNameInDifferentPackage/!sameClassNameInDifferentPackage.h @@ -20,16 +20,16 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (NSString *)someMethodInFooA __attribute__((swift_name("someMethodInFooA()"))); +- (NSString *)someMethodInFooA; @end __attribute__((objc_subclassing_restricted)) @interface Foo_ : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (NSString *)someMethodInFooB __attribute__((swift_name("someMethodInFooB()"))); +- (NSString *)someMethodInFooB; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/sameFunctionNameInDifferentClass/!sameFunctionNameInDifferentClass.h b/native/objcexport-header-generator/testData/headers/sameFunctionNameInDifferentClass/!sameFunctionNameInDifferentClass.h index 853a73289a28b..3eb9e1d65a351 100644 --- a/native/objcexport-header-generator/testData/headers/sameFunctionNameInDifferentClass/!sameFunctionNameInDifferentClass.h +++ b/native/objcexport-header-generator/testData/headers/sameFunctionNameInDifferentClass/!sameFunctionNameInDifferentClass.h @@ -20,20 +20,20 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Bar : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (int32_t)someMethodWithDiffReturnType __attribute__((swift_name("someMethodWithDiffReturnType()"))); -- (void)someMethodWithSameReturnType __attribute__((swift_name("someMethodWithSameReturnType()"))); +- (int32_t)someMethodWithDiffReturnType; +- (void)someMethodWithSameReturnType; @end __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (NSString *)someMethodWithDiffReturnType __attribute__((swift_name("someMethodWithDiffReturnType()"))); -- (void)someMethodWithSameReturnType __attribute__((swift_name("someMethodWithSameReturnType()"))); +- (NSString *)someMethodWithDiffReturnType; +- (void)someMethodWithSameReturnType; @end #pragma pop_macro("_Nullable_result") #pragma clang diagnostic pop -NS_ASSUME_NONNULL_END \ No newline at end of file +NS_ASSUME_NONNULL_END diff --git a/native/objcexport-header-generator/testData/headers/sameFunctionNameInDifferentInterface/!sameFunctionNameInDifferentInterface.h b/native/objcexport-header-generator/testData/headers/sameFunctionNameInDifferentInterface/!sameFunctionNameInDifferentInterface.h index 1034e1bf4f356..955c117d0dde9 100644 --- a/native/objcexport-header-generator/testData/headers/sameFunctionNameInDifferentInterface/!sameFunctionNameInDifferentInterface.h +++ b/native/objcexport-header-generator/testData/headers/sameFunctionNameInDifferentInterface/!sameFunctionNameInDifferentInterface.h @@ -20,16 +20,16 @@ NS_ASSUME_NONNULL_BEGIN @protocol Bar @required -- (int32_t)someMethodWithDiffReturnType __attribute__((swift_name("someMethodWithDiffReturnType()"))); -- (void)someMethodWithSameReturnType __attribute__((swift_name("someMethodWithSameReturnType()"))); +- (int32_t)someMethodWithDiffReturnType; +- (void)someMethodWithSameReturnType; @end @protocol Foo @required -- (NSString *)someMethodWithDiffReturnType_ __attribute__((swift_name("someMethodWithDiffReturnType_()"))); -- (void)someMethodWithSameReturnType __attribute__((swift_name("someMethodWithSameReturnType()"))); +- (NSString *)someMethodWithDiffReturnType_; +- (void)someMethodWithSameReturnType; @end #pragma pop_macro("_Nullable_result") #pragma clang diagnostic pop -NS_ASSUME_NONNULL_END \ No newline at end of file +NS_ASSUME_NONNULL_END diff --git a/native/objcexport-header-generator/testData/headers/samePropertyAndFunctionName/!samePropertyAndFunctionName.h b/native/objcexport-header-generator/testData/headers/samePropertyAndFunctionName/!samePropertyAndFunctionName.h index ab675f8c32c4b..439dd8ad25b0e 100644 --- a/native/objcexport-header-generator/testData/headers/samePropertyAndFunctionName/!samePropertyAndFunctionName.h +++ b/native/objcexport-header-generator/testData/headers/samePropertyAndFunctionName/!samePropertyAndFunctionName.h @@ -20,8 +20,8 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -+ (NSString *)foo __attribute__((swift_name("foo()"))); -@property (class, readonly, getter=foo_) int32_t foo __attribute__((swift_name("foo"))); ++ (NSString *)foo; +@property (class, readonly, getter=foo_) int32_t foo; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/simpleClass/!simpleClass.h b/native/objcexport-header-generator/testData/headers/simpleClass/!simpleClass.h index db8954d979385..cda38ea0c01a9 100644 --- a/native/objcexport-header-generator/testData/headers/simpleClass/!simpleClass.h +++ b/native/objcexport-header-generator/testData/headers/simpleClass/!simpleClass.h @@ -20,10 +20,10 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (NSString *)someMethod __attribute__((swift_name("someMethod()"))); -@property (readonly) int32_t someProperty __attribute__((swift_name("someProperty"))); +- (NSString *)someMethod; +@property (readonly) int32_t someProperty; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/simpleDataClass/!simpleDataClass.h b/native/objcexport-header-generator/testData/headers/simpleDataClass/!simpleDataClass.h index 1072ba9d342cf..4ca7b722b3dba 100644 --- a/native/objcexport-header-generator/testData/headers/simpleDataClass/!simpleDataClass.h +++ b/native/objcexport-header-generator/testData/headers/simpleDataClass/!simpleDataClass.h @@ -25,11 +25,11 @@ __attribute__((objc_subclassing_restricted)) - (instancetype)initWithIntValue:(int32_t)intValue intVar:(int32_t)intVar nullableDefaultStringValue:(NSString * _Nullable)nullableDefaultStringValue __attribute__((swift_name("init(intValue:intVar:nullableDefaultStringValue:)"))) __attribute__((objc_designated_initializer)); - (SimpleDataClass *)doCopyIntValue:(int32_t)intValue intVar:(int32_t)intVar nullableDefaultStringValue:(NSString * _Nullable)nullableDefaultStringValue __attribute__((swift_name("doCopy(intValue:intVar:nullableDefaultStringValue:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) int32_t intValue __attribute__((swift_name("intValue"))); -@property int32_t intVar __attribute__((swift_name("intVar"))); -@property (readonly) NSString * _Nullable nullableDefaultStringValue __attribute__((swift_name("nullableDefaultStringValue"))); +- (NSUInteger)hash; +- (NSString *)description; +@property (readonly) int32_t intValue; +@property int32_t intVar; +@property (readonly) NSString * _Nullable nullableDefaultStringValue; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/simpleEnumClass/!simpleEnumClass.h b/native/objcexport-header-generator/testData/headers/simpleEnumClass/!simpleEnumClass.h index 68dd05e4454ee..d84ebe7e980bb 100644 --- a/native/objcexport-header-generator/testData/headers/simpleEnumClass/!simpleEnumClass.h +++ b/native/objcexport-header-generator/testData/headers/simpleEnumClass/!simpleEnumClass.h @@ -29,13 +29,13 @@ NS_ASSUME_NONNULL_BEGIN @interface KotlinEnum : Base - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)); -@property (class, readonly, getter=companion) KotlinEnumCompanion *companion __attribute__((swift_name("companion"))); +@property (class, readonly, getter=companion) KotlinEnumCompanion *companion; - (int32_t)compareToOther:(E)other __attribute__((swift_name("compareTo(other:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); -- (NSUInteger)hash __attribute__((swift_name("hash()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) NSString *name __attribute__((swift_name("name"))); -@property (readonly) int32_t ordinal __attribute__((swift_name("ordinal"))); +- (NSUInteger)hash; +- (NSString *)description; +@property (readonly) NSString *name; +@property (readonly) int32_t ordinal; @end __attribute__((objc_subclassing_restricted)) @@ -43,11 +43,11 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); -@property (class, readonly) Foo *a __attribute__((swift_name("a"))); -@property (class, readonly) Foo *b __attribute__((swift_name("b"))); -@property (class, readonly) Foo *c __attribute__((swift_name("c"))); -+ (KotlinArray *)values __attribute__((swift_name("values()"))); -@property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); +@property (class, readonly) Foo *a; +@property (class, readonly) Foo *b; +@property (class, readonly) Foo *c; ++ (KotlinArray *)values; +@property (class, readonly) NSArray *entries; @end __attribute__((objc_subclassing_restricted)) @@ -55,7 +55,7 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) KotlinEnumCompanion *shared __attribute__((swift_name("shared"))); +@property (class, readonly, getter=shared) KotlinEnumCompanion *shared; @end __attribute__((objc_subclassing_restricted)) @@ -64,15 +64,15 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/simpleInterface/!simpleInterface.h b/native/objcexport-header-generator/testData/headers/simpleInterface/!simpleInterface.h index 38924fbfcb37c..08d002fd6b9ed 100644 --- a/native/objcexport-header-generator/testData/headers/simpleInterface/!simpleInterface.h +++ b/native/objcexport-header-generator/testData/headers/simpleInterface/!simpleInterface.h @@ -20,8 +20,8 @@ NS_ASSUME_NONNULL_BEGIN @protocol Foo @required -- (NSString *)someMethod __attribute__((swift_name("someMethod()"))); -@property (readonly) int32_t someProperty __attribute__((swift_name("someProperty"))); +- (NSString *)someMethod; +@property (readonly) int32_t someProperty; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/simpleObject/!simpleObject.h b/native/objcexport-header-generator/testData/headers/simpleObject/!simpleObject.h index 0ecdc6aae650b..e12b858bd1274 100644 --- a/native/objcexport-header-generator/testData/headers/simpleObject/!simpleObject.h +++ b/native/objcexport-header-generator/testData/headers/simpleObject/!simpleObject.h @@ -25,9 +25,9 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)foo __attribute__((swift_name("init()"))); -@property (class, readonly, getter=shared) Foo *shared __attribute__((swift_name("shared"))); -- (NSString *)someMethod __attribute__((swift_name("someMethod()"))); -@property (readonly) int32_t someProperty __attribute__((swift_name("someProperty"))); +@property (class, readonly, getter=shared) Foo *shared; +- (NSString *)someMethod; +@property (readonly) int32_t someProperty; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/sinceVersionAnnotation/!sinceVersionAnnotation.h b/native/objcexport-header-generator/testData/headers/sinceVersionAnnotation/!sinceVersionAnnotation.h index c9d92492e2159..1444a6fd5125d 100644 --- a/native/objcexport-header-generator/testData/headers/sinceVersionAnnotation/!sinceVersionAnnotation.h +++ b/native/objcexport-header-generator/testData/headers/sinceVersionAnnotation/!sinceVersionAnnotation.h @@ -25,7 +25,7 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlin.SinceKotlin(version="1.4") */ -+ (void)foo __attribute__((swift_name("foo()"))); ++ (void)foo; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/sourceFileWithDotInName/!sourceFileWithDotInName.h b/native/objcexport-header-generator/testData/headers/sourceFileWithDotInName/!sourceFileWithDotInName.h index 02761f27e33b1..bea33d635760c 100644 --- a/native/objcexport-header-generator/testData/headers/sourceFileWithDotInName/!sourceFileWithDotInName.h +++ b/native/objcexport-header-generator/testData/headers/sourceFileWithDotInName/!sourceFileWithDotInName.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo_iosKt : Base -+ (void)foo __attribute__((swift_name("foo()"))); ++ (void)foo; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/specialFunctionNames/!specialFunctionNames.h b/native/objcexport-header-generator/testData/headers/specialFunctionNames/!specialFunctionNames.h index 98316966f9648..d2fb65752ac16 100644 --- a/native/objcexport-header-generator/testData/headers/specialFunctionNames/!specialFunctionNames.h +++ b/native/objcexport-header-generator/testData/headers/specialFunctionNames/!specialFunctionNames.h @@ -22,13 +22,13 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (void)doAlloc __attribute__((swift_name("doAlloc()"))); -- (Foo *)doCopy __attribute__((swift_name("doCopy()"))); -- (Foo *)doInit __attribute__((swift_name("doInit()"))); -- (Foo *)doMutableCopy __attribute__((swift_name("doMutableCopy()"))); -- (Foo *)doNew __attribute__((swift_name("doNew()"))); +- (void)doAlloc; +- (Foo *)doCopy; +- (Foo *)doInit; +- (Foo *)doMutableCopy; +- (Foo *)doNew; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/specialFunctionNamesExplicitMethodFamily/!specialFunctionNamesExplicitMethodFamily.h b/native/objcexport-header-generator/testData/headers/specialFunctionNamesExplicitMethodFamily/!specialFunctionNamesExplicitMethodFamily.h index 76ac5f7960f06..150778773136e 100644 --- a/native/objcexport-header-generator/testData/headers/specialFunctionNamesExplicitMethodFamily/!specialFunctionNamesExplicitMethodFamily.h +++ b/native/objcexport-header-generator/testData/headers/specialFunctionNamesExplicitMethodFamily/!specialFunctionNamesExplicitMethodFamily.h @@ -22,39 +22,39 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (Foo *)__init __attribute__((swift_name("__init()"))) __attribute__((objc_method_family(none))); +- (Foo *)__init __attribute__((objc_method_family(none))); - (Foo *)__initOtherX:(int32_t)x __attribute__((swift_name("__initOther(x:)"))) __attribute__((objc_method_family(none))); - (Foo *)__initWithX:(int32_t)x __attribute__((swift_name("__initWith(x:)"))) __attribute__((objc_method_family(none))); -- (Foo *)__initializer __attribute__((swift_name("__initializer()"))); -- (Foo *)_init __attribute__((swift_name("_init()"))) __attribute__((objc_method_family(none))); +- (Foo *)__initializer; +- (Foo *)_init __attribute__((objc_method_family(none))); - (Foo *)_initOtherX:(int32_t)x __attribute__((swift_name("_initOther(x:)"))) __attribute__((objc_method_family(none))); - (Foo *)_initWithX:(int32_t)x __attribute__((swift_name("_initWith(x:)"))) __attribute__((objc_method_family(none))); -- (Foo *)_initializer __attribute__((swift_name("_initializer()"))); -- (void)alloc __attribute__((swift_name("alloc()"))) __attribute__((objc_method_family(none))); +- (Foo *)_initializer; +- (void)alloc __attribute__((objc_method_family(none))); - (void)allocWithX:(int32_t)x __attribute__((swift_name("allocWith(x:)"))) __attribute__((objc_method_family(none))); -- (void)allocation __attribute__((swift_name("allocation()"))); -- (Foo *)copy __attribute__((swift_name("copy()"))) __attribute__((objc_method_family(none))); +- (void)allocation; +- (Foo *)copy __attribute__((objc_method_family(none))); - (Foo *)copyWithX:(int32_t)x __attribute__((swift_name("copyWith(x:)"))) __attribute__((objc_method_family(none))); -- (Foo *)copymachine __attribute__((swift_name("copymachine()"))); -- (Foo *)doInit __attribute__((swift_name("doInit()"))); +- (Foo *)copymachine; +- (Foo *)doInit; - (Foo *)initOtherX:(int32_t)x __attribute__((swift_name("initOther(x:)"))) __attribute__((objc_method_family(none))); - (Foo *)doInitWithX:(int32_t)x __attribute__((swift_name("doInitWith(x:)"))); -- (Foo *)initializer __attribute__((swift_name("initializer()"))); -- (Foo *)mutableCopy __attribute__((swift_name("mutableCopy()"))) __attribute__((objc_method_family(none))); +- (Foo *)initializer; +- (Foo *)mutableCopy __attribute__((objc_method_family(none))); - (Foo *)mutableCopyWithX:(int32_t)x __attribute__((swift_name("mutableCopyWith(x:)"))) __attribute__((objc_method_family(none))); -- (Foo *)mutableCopymachine __attribute__((swift_name("mutableCopymachine()"))); -- (Foo *)new __attribute__((swift_name("new()"))) __attribute__((objc_method_family(none))); +- (Foo *)mutableCopymachine; +- (Foo *)new __attribute__((objc_method_family(none))); - (Foo *)newWithX:(int32_t)x __attribute__((swift_name("newWith(x:)"))) __attribute__((objc_method_family(none))); -- (Foo *)newer __attribute__((swift_name("newer()"))); -@property (getter=_init_) int32_t _init __attribute__((swift_name("_init"))); -- (int32_t)_init_ __attribute__((swift_name("_init_()"))) __attribute__((objc_method_family(none))); -@property (getter=doInit_) int32_t init __attribute__((swift_name("init"))); -@property int32_t initOther __attribute__((swift_name("initOther"))); -- (int32_t)initOther __attribute__((swift_name("initOther()"))) __attribute__((objc_method_family(none))); -@property (getter=doInitWith) int32_t initWith __attribute__((swift_name("initWith"))); -@property (getter=initializer_) int32_t initializer __attribute__((swift_name("initializer"))); +- (Foo *)newer; +@property (getter=_init_) int32_t _init; +- (int32_t)_init_ __attribute__((objc_method_family(none))); +@property (getter=doInit_) int32_t init; +@property int32_t initOther; +- (int32_t)initOther __attribute__((objc_method_family(none))); +@property (getter=doInitWith) int32_t initWith; +@property (getter=initializer_) int32_t initializer; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/subclassParameterTypeTranslationWithoutUpperBound/!subclassParameterTypeTranslationWithoutUpperBound.h b/native/objcexport-header-generator/testData/headers/subclassParameterTypeTranslationWithoutUpperBound/!subclassParameterTypeTranslationWithoutUpperBound.h index cacb525c7fb16..d951678c2c63b 100644 --- a/native/objcexport-header-generator/testData/headers/subclassParameterTypeTranslationWithoutUpperBound/!subclassParameterTypeTranslationWithoutUpperBound.h +++ b/native/objcexport-header-generator/testData/headers/subclassParameterTypeTranslationWithoutUpperBound/!subclassParameterTypeTranslationWithoutUpperBound.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN @interface Success : Base - (instancetype)initWithData:(T _Nullable)data __attribute__((swift_name("init(data:)"))) __attribute__((objc_designated_initializer)); -@property (readonly) T _Nullable data __attribute__((swift_name("data"))); +@property (readonly) T _Nullable data; @end __attribute__((objc_subclassing_restricted)) diff --git a/native/objcexport-header-generator/testData/headers/superClassExtensionsMangling/!superClassExtensionsMangling.h b/native/objcexport-header-generator/testData/headers/superClassExtensionsMangling/!superClassExtensionsMangling.h index 048d3a8f18d1b..f7d0acec9cc37 100644 --- a/native/objcexport-header-generator/testData/headers/superClassExtensionsMangling/!superClassExtensionsMangling.h +++ b/native/objcexport-header-generator/testData/headers/superClassExtensionsMangling/!superClassExtensionsMangling.h @@ -21,28 +21,28 @@ NS_ASSUME_NONNULL_BEGIN #endif @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end __attribute__((objc_subclassing_restricted)) @interface Bar : Foo -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); @end @interface Bar (Extensions) -- (void)extFun __attribute__((swift_name("extFun()"))); +- (void)extFun; - (void)extFunP0:(BOOL)p0 p1:(NSString *)p1 __attribute__((swift_name("extFun(p0:p1:)"))); -@property (readonly) int32_t propVal __attribute__((swift_name("propVal"))); -@property int32_t propVar __attribute__((swift_name("propVar"))); +@property (readonly) int32_t propVal; +@property int32_t propVar; @end @interface Foo (Extensions) -- (void)extFun_ __attribute__((swift_name("extFun_()"))); +- (void)extFun_; - (void)extFunP0:(NSString *)p0 p1_:(BOOL)p1 __attribute__((swift_name("extFun(p0:p1_:)"))); -@property (readonly) int32_t propVal_ __attribute__((swift_name("propVal_"))); -@property int32_t propVar_ __attribute__((swift_name("propVar_"))); +@property (readonly) int32_t propVal_; +@property int32_t propVar_; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/superClassWithCovariantOverride/!superClassWithCovariantOverride.h b/native/objcexport-header-generator/testData/headers/superClassWithCovariantOverride/!superClassWithCovariantOverride.h index 2c1d04ea4ba4d..3bf0b13202993 100644 --- a/native/objcexport-header-generator/testData/headers/superClassWithCovariantOverride/!superClassWithCovariantOverride.h +++ b/native/objcexport-header-generator/testData/headers/superClassWithCovariantOverride/!superClassWithCovariantOverride.h @@ -21,16 +21,16 @@ NS_ASSUME_NONNULL_BEGIN #endif @interface Bar : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (id)foo __attribute__((swift_name("foo()"))); +- (id)foo; @end __attribute__((objc_subclassing_restricted)) @interface Foo : Bar -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -- (NSString *)foo __attribute__((swift_name("foo()"))); +- (NSString *)foo; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/suspendFunction/!suspendFunction.h b/native/objcexport-header-generator/testData/headers/suspendFunction/!suspendFunction.h index 38460160a8fdb..7edccb2394a40 100644 --- a/native/objcexport-header-generator/testData/headers/suspendFunction/!suspendFunction.h +++ b/native/objcexport-header-generator/testData/headers/suspendFunction/!suspendFunction.h @@ -33,7 +33,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface KotlinThrowable : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -43,16 +43,16 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlin.experimental.ExperimentalNativeApi */ -- (KotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); -- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) KotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); -@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); -- (NSError *)asError __attribute__((swift_name("asError()"))); +- (KotlinArray *)getStackTrace; +- (void)printStackTrace; +- (NSString *)description; +@property (readonly) KotlinThrowable * _Nullable cause; +@property (readonly) NSString * _Nullable message; +- (NSError *)asError; @end @interface KotlinException : KotlinThrowable -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -60,7 +60,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface KotlinRuntimeException : KotlinException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -68,7 +68,7 @@ __attribute__((objc_subclassing_restricted)) @end @interface KotlinIllegalStateException : KotlinRuntimeException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -81,7 +81,7 @@ __attribute__((objc_subclassing_restricted)) * kotlin.SinceKotlin(version="1.4") */ @interface KotlinCancellationException : KotlinIllegalStateException -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -94,15 +94,15 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/throwable/!throwable.h b/native/objcexport-header-generator/testData/headers/throwable/!throwable.h index 65a3ea307e3c4..dab30798fb06a 100644 --- a/native/objcexport-header-generator/testData/headers/throwable/!throwable.h +++ b/native/objcexport-header-generator/testData/headers/throwable/!throwable.h @@ -24,11 +24,11 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) KotlinThrowable * _Nullable throwable __attribute__((swift_name("throwable"))); +@property (class, readonly) KotlinThrowable * _Nullable throwable; @end @interface KotlinThrowable : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); - (instancetype)initWithMessage:(NSString * _Nullable)message __attribute__((swift_name("init(message:)"))) __attribute__((objc_designated_initializer)); - (instancetype)initWithCause:(KotlinThrowable * _Nullable)cause __attribute__((swift_name("init(cause:)"))) __attribute__((objc_designated_initializer)); @@ -38,12 +38,12 @@ __attribute__((objc_subclassing_restricted)) * @note annotations * kotlin.experimental.ExperimentalNativeApi */ -- (KotlinArray *)getStackTrace __attribute__((swift_name("getStackTrace()"))); -- (void)printStackTrace __attribute__((swift_name("printStackTrace()"))); -- (NSString *)description __attribute__((swift_name("description()"))); -@property (readonly) KotlinThrowable * _Nullable cause __attribute__((swift_name("cause"))); -@property (readonly) NSString * _Nullable message __attribute__((swift_name("message"))); -- (NSError *)asError __attribute__((swift_name("asError()"))); +- (KotlinArray *)getStackTrace; +- (void)printStackTrace; +- (NSString *)description; +@property (readonly) KotlinThrowable * _Nullable cause; +@property (readonly) NSString * _Nullable message; +- (NSError *)asError; @end __attribute__((objc_subclassing_restricted)) @@ -52,15 +52,15 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/topLevelFunction/!topLevelFunction.h b/native/objcexport-header-generator/testData/headers/topLevelFunction/!topLevelFunction.h index 226c5760f2864..fb01326f5b2d3 100644 --- a/native/objcexport-header-generator/testData/headers/topLevelFunction/!topLevelFunction.h +++ b/native/objcexport-header-generator/testData/headers/topLevelFunction/!topLevelFunction.h @@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -+ (NSString *)myTopLevelFunction __attribute__((swift_name("myTopLevelFunction()"))); ++ (NSString *)myTopLevelFunction; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/topLevelFunctionWithNumberReturn/!topLevelFunctionWithNumberReturn.h b/native/objcexport-header-generator/testData/headers/topLevelFunctionWithNumberReturn/!topLevelFunctionWithNumberReturn.h index 7d953649884ce..0995691d38256 100644 --- a/native/objcexport-header-generator/testData/headers/topLevelFunctionWithNumberReturn/!topLevelFunctionWithNumberReturn.h +++ b/native/objcexport-header-generator/testData/headers/topLevelFunctionWithNumberReturn/!topLevelFunctionWithNumberReturn.h @@ -20,16 +20,16 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -+ (int8_t)myByte __attribute__((swift_name("myByte()"))); -+ (double)myDouble __attribute__((swift_name("myDouble()"))); -+ (float)myFloat __attribute__((swift_name("myFloat()"))); -+ (int32_t)myInt __attribute__((swift_name("myInt()"))); -+ (int64_t)myLong __attribute__((swift_name("myLong()"))); -+ (int16_t)myShort __attribute__((swift_name("myShort()"))); -+ (uint8_t)myUByte __attribute__((swift_name("myUByte()"))); -+ (uint32_t)myUInt __attribute__((swift_name("myUInt()"))); -+ (uint64_t)myULong __attribute__((swift_name("myULong()"))); -+ (uint16_t)myUShort __attribute__((swift_name("myUShort()"))); ++ (int8_t)myByte; ++ (double)myDouble; ++ (float)myFloat; ++ (int32_t)myInt; ++ (int64_t)myLong; ++ (int16_t)myShort; ++ (uint8_t)myUByte; ++ (uint32_t)myUInt; ++ (uint64_t)myULong; ++ (uint16_t)myUShort; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/topLevelProperty/!topLevelProperty.h b/native/objcexport-header-generator/testData/headers/topLevelProperty/!topLevelProperty.h index 742073bc8ba06..664211e93ed7c 100644 --- a/native/objcexport-header-generator/testData/headers/topLevelProperty/!topLevelProperty.h +++ b/native/objcexport-header-generator/testData/headers/topLevelProperty/!topLevelProperty.h @@ -20,8 +20,8 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface FooKt : Base -@property (class, readonly) int32_t topLevelVal __attribute__((swift_name("topLevelVal"))); -@property (class) int32_t topLevelVar __attribute__((swift_name("topLevelVar"))); +@property (class, readonly) int32_t topLevelVal; +@property (class) int32_t topLevelVar; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/varWithPrivateSetterTranslatedAsImmutableProperty/!varWithPrivateSetterTranslatedAsImmutableProperty.h b/native/objcexport-header-generator/testData/headers/varWithPrivateSetterTranslatedAsImmutableProperty/!varWithPrivateSetterTranslatedAsImmutableProperty.h index 1e9e06487cf15..eae47abb60f4a 100644 --- a/native/objcexport-header-generator/testData/headers/varWithPrivateSetterTranslatedAsImmutableProperty/!varWithPrivateSetterTranslatedAsImmutableProperty.h +++ b/native/objcexport-header-generator/testData/headers/varWithPrivateSetterTranslatedAsImmutableProperty/!varWithPrivateSetterTranslatedAsImmutableProperty.h @@ -20,9 +20,9 @@ NS_ASSUME_NONNULL_BEGIN __attribute__((objc_subclassing_restricted)) @interface Foo : Base -- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer)); +- (instancetype)init __attribute__((objc_designated_initializer)); + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end #pragma pop_macro("_Nullable_result") diff --git a/native/objcexport-header-generator/testData/headers/vararg/!vararg.h b/native/objcexport-header-generator/testData/headers/vararg/!vararg.h index 51ae2197a0dda..26984f29db944 100644 --- a/native/objcexport-header-generator/testData/headers/vararg/!vararg.h +++ b/native/objcexport-header-generator/testData/headers/vararg/!vararg.h @@ -33,15 +33,15 @@ __attribute__((objc_subclassing_restricted)) + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); -- (id)iterator __attribute__((swift_name("iterator()"))); +- (id)iterator; - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); -@property (readonly) int32_t size __attribute__((swift_name("size"))); +@property (readonly) int32_t size; @end @protocol KotlinIterator @required -- (BOOL)hasNext __attribute__((swift_name("hasNext()"))); -- (id _Nullable)next __attribute__((swift_name("next()"))); +- (BOOL)hasNext; +- (id _Nullable)next; @end #pragma pop_macro("_Nullable_result")