[Native] Rename o.j.k.cli.klib.IdSignatureRenderer to avoid name clash with o.j.k.ir.util.IdSignatureRenderer
^KT-59486
This commit is contained in:
committed by
Space Team
parent
4c0583e415
commit
a17ce79088
+2
-2
@@ -5,10 +5,10 @@ import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorVisitorEmptyBodies
|
||||
import org.jetbrains.kotlin.utils.Printer
|
||||
|
||||
class DeclarationPrinter(
|
||||
internal class DeclarationPrinter(
|
||||
out: Appendable,
|
||||
private val headerRenderer: DeclarationHeaderRenderer,
|
||||
private val signatureRenderer: IdSignatureRenderer
|
||||
private val signatureRenderer: KlibSignatureRenderer
|
||||
) {
|
||||
private val printer = Printer(out, 1, " ")
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.jetbrains.kotlin.descriptors.ClassKind
|
||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||
import org.jetbrains.kotlin.ir.util.render
|
||||
|
||||
class DefaultIdSignatureRenderer(private val prefix: String? = null) : IdSignatureRenderer {
|
||||
internal class DefaultKlibSignatureRenderer(private val prefix: String? = null) : KlibSignatureRenderer {
|
||||
private val idSignaturer = KonanIdSignaturer(KonanManglerDesc)
|
||||
|
||||
override fun render(descriptor: DeclarationDescriptor): String? {
|
||||
+2
-2
@@ -2,11 +2,11 @@ package org.jetbrains.kotlin.cli.klib
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||
|
||||
interface IdSignatureRenderer {
|
||||
internal interface KlibSignatureRenderer {
|
||||
fun render(descriptor: DeclarationDescriptor): String?
|
||||
|
||||
companion object {
|
||||
val NO_SIGNATURE = object : IdSignatureRenderer {
|
||||
val NO_SIGNATURE = object : KlibSignatureRenderer {
|
||||
override fun render(descriptor: DeclarationDescriptor): String? = null
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -5,9 +5,9 @@ import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorVisitorEmptyBodies
|
||||
import org.jetbrains.kotlin.utils.Printer
|
||||
|
||||
class SignaturePrinter(
|
||||
internal class SignaturePrinter(
|
||||
out: Appendable,
|
||||
private val signatureRenderer: IdSignatureRenderer
|
||||
private val signatureRenderer: KlibSignatureRenderer
|
||||
) {
|
||||
private val printer = Printer(out)
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ class Library(val libraryNameOrPath: String, val requestedRepository: String?, v
|
||||
|
||||
fun contents(output: Appendable, printSignatures: Boolean) {
|
||||
val module = loadModule()
|
||||
val signatureRenderer = if (printSignatures) DefaultIdSignatureRenderer("// ID signature: ") else IdSignatureRenderer.NO_SIGNATURE
|
||||
val signatureRenderer = if (printSignatures) DefaultKlibSignatureRenderer("// ID signature: ") else KlibSignatureRenderer.NO_SIGNATURE
|
||||
val printer = DeclarationPrinter(output, DefaultDeclarationHeaderRenderer, signatureRenderer)
|
||||
|
||||
printer.print(module)
|
||||
@@ -174,7 +174,7 @@ class Library(val libraryNameOrPath: String, val requestedRepository: String?, v
|
||||
|
||||
fun signatures(output: Appendable) {
|
||||
val module = loadModule()
|
||||
val printer = SignaturePrinter(output, DefaultIdSignatureRenderer())
|
||||
val printer = SignaturePrinter(output, DefaultKlibSignatureRenderer())
|
||||
|
||||
printer.print(module)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user