aboutsummaryrefslogtreecommitdiff
path: root/subprojects/analysis-kotlin-api/src
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-08-31 20:16:01 +0200
committerGitHub <noreply@github.com>2023-08-31 20:16:01 +0200
commit02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 (patch)
tree66f6d6f089a93b863bf1144666491eca6729ad05 /subprojects/analysis-kotlin-api/src
parent6a181a7a2b03ec263788d137610e86937a57d434 (diff)
downloaddokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.gz
dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.tar.bz2
dokka-02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33.zip
Enable explicit API mode (#3139)
Diffstat (limited to 'subprojects/analysis-kotlin-api/src')
-rw-r--r--subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/KotlinAnalysisPlugin.kt2
-rw-r--r--subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/DocumentableSourceLanguageParser.kt6
-rw-r--r--subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ExternalDocumentablesProvider.kt4
-rw-r--r--subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/FullClassHierarchyBuilder.kt8
-rw-r--r--subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InheritanceBuilder.kt6
-rw-r--r--subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InternalKotlinAnalysisPlugin.kt19
-rw-r--r--subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/KotlinToJavaService.kt4
-rw-r--r--subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ModuleAndPackageDocumentationReader.kt8
-rw-r--r--subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SampleProvider.kt14
-rw-r--r--subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SyntheticDocumentableDetector.kt4
10 files changed, 39 insertions, 36 deletions
diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/KotlinAnalysisPlugin.kt b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/KotlinAnalysisPlugin.kt
index 8d72d3e1..7d434bd5 100644
--- a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/KotlinAnalysisPlugin.kt
+++ b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/KotlinAnalysisPlugin.kt
@@ -8,7 +8,7 @@ import org.jetbrains.dokka.plugability.DokkaPlugin
import org.jetbrains.dokka.plugability.DokkaPluginApiPreview
import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement
-class KotlinAnalysisPlugin : DokkaPlugin() {
+public class KotlinAnalysisPlugin : DokkaPlugin() {
/*
* This is where stable public API will go.
diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/DocumentableSourceLanguageParser.kt b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/DocumentableSourceLanguageParser.kt
index ce66d09f..116adb06 100644
--- a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/DocumentableSourceLanguageParser.kt
+++ b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/DocumentableSourceLanguageParser.kt
@@ -10,11 +10,11 @@ import org.jetbrains.dokka.model.Documentable
import org.jetbrains.dokka.model.WithSources
@InternalDokkaApi
-enum class DocumentableLanguage {
+public enum class DocumentableLanguage {
JAVA, KOTLIN
}
@InternalDokkaApi
-interface DocumentableSourceLanguageParser {
- fun getLanguage(documentable: Documentable, sourceSet: DokkaConfiguration.DokkaSourceSet): DocumentableLanguage?
+public interface DocumentableSourceLanguageParser {
+ public fun getLanguage(documentable: Documentable, sourceSet: DokkaConfiguration.DokkaSourceSet): DocumentableLanguage?
}
diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ExternalDocumentablesProvider.kt b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ExternalDocumentablesProvider.kt
index 4d2f15ab..7c564880 100644
--- a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ExternalDocumentablesProvider.kt
+++ b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ExternalDocumentablesProvider.kt
@@ -17,12 +17,12 @@ import org.jetbrains.dokka.model.DClasslike
* of classes defined in project).
*/
@InternalDokkaApi
-fun interface ExternalDocumentablesProvider {
+public fun interface ExternalDocumentablesProvider {
/**
* Returns [DClasslike] matching provided [DRI] in specified source set.
*
* Result is null if compiler haven't generated matching class descriptor.
*/
- fun findClasslike(dri: DRI, sourceSet: DokkaConfiguration.DokkaSourceSet): DClasslike?
+ public fun findClasslike(dri: DRI, sourceSet: DokkaConfiguration.DokkaSourceSet): DClasslike?
}
diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/FullClassHierarchyBuilder.kt b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/FullClassHierarchyBuilder.kt
index 467a5f78..5b975fd8 100644
--- a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/FullClassHierarchyBuilder.kt
+++ b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/FullClassHierarchyBuilder.kt
@@ -10,12 +10,12 @@ import org.jetbrains.dokka.model.DModule
import org.jetbrains.dokka.model.SourceSetDependent
@InternalDokkaApi
-typealias Supertypes = List<DRI>
+public typealias Supertypes = List<DRI>
@InternalDokkaApi
-typealias ClassHierarchy = SourceSetDependent<Map<DRI, Supertypes>>
+public typealias ClassHierarchy = SourceSetDependent<Map<DRI, Supertypes>>
@InternalDokkaApi
-interface FullClassHierarchyBuilder {
- suspend fun build(module: DModule): ClassHierarchy
+public interface FullClassHierarchyBuilder {
+ public suspend fun build(module: DModule): ClassHierarchy
}
diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InheritanceBuilder.kt b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InheritanceBuilder.kt
index 175b162e..32077cde 100644
--- a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InheritanceBuilder.kt
+++ b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InheritanceBuilder.kt
@@ -9,12 +9,12 @@ import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.model.Documentable
@InternalDokkaApi
-interface InheritanceBuilder {
- fun build(documentables: Map<DRI, Documentable>): List<InheritanceNode>
+public interface InheritanceBuilder {
+ public fun build(documentables: Map<DRI, Documentable>): List<InheritanceNode>
}
@InternalDokkaApi
-data class InheritanceNode(
+public data class InheritanceNode(
val dri: DRI,
val children: List<InheritanceNode> = emptyList(),
val interfaces: List<DRI> = emptyList(),
diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InternalKotlinAnalysisPlugin.kt b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InternalKotlinAnalysisPlugin.kt
index 8fb08ae4..0ef1399a 100644
--- a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InternalKotlinAnalysisPlugin.kt
+++ b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/InternalKotlinAnalysisPlugin.kt
@@ -7,6 +7,7 @@ package org.jetbrains.dokka.analysis.kotlin.internal
import org.jetbrains.dokka.InternalDokkaApi
import org.jetbrains.dokka.plugability.DokkaPlugin
import org.jetbrains.dokka.plugability.DokkaPluginApiPreview
+import org.jetbrains.dokka.plugability.ExtensionPoint
import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement
/**
@@ -14,23 +15,23 @@ import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement
* external plugins. If you need any of the given API stabilized, please create an issue describing your use case.
*/
@InternalDokkaApi
-class InternalKotlinAnalysisPlugin : DokkaPlugin() {
+public class InternalKotlinAnalysisPlugin : DokkaPlugin() {
- val fullClassHierarchyBuilder by extensionPoint<FullClassHierarchyBuilder>()
+ public val fullClassHierarchyBuilder: ExtensionPoint<FullClassHierarchyBuilder> by extensionPoint()
- val syntheticDocumentableDetector by extensionPoint<SyntheticDocumentableDetector>()
+ public val syntheticDocumentableDetector: ExtensionPoint<SyntheticDocumentableDetector> by extensionPoint()
- val moduleAndPackageDocumentationReader by extensionPoint<ModuleAndPackageDocumentationReader>()
+ public val moduleAndPackageDocumentationReader: ExtensionPoint<ModuleAndPackageDocumentationReader> by extensionPoint()
- val kotlinToJavaService by extensionPoint<KotlinToJavaService>()
+ public val kotlinToJavaService: ExtensionPoint<KotlinToJavaService> by extensionPoint()
- val inheritanceBuilder by extensionPoint<InheritanceBuilder>()
+ public val inheritanceBuilder: ExtensionPoint<InheritanceBuilder> by extensionPoint()
- val externalDocumentablesProvider by extensionPoint<ExternalDocumentablesProvider>()
+ public val externalDocumentablesProvider: ExtensionPoint<ExternalDocumentablesProvider> by extensionPoint()
- val documentableSourceLanguageParser by extensionPoint<DocumentableSourceLanguageParser>()
+ public val documentableSourceLanguageParser: ExtensionPoint<DocumentableSourceLanguageParser> by extensionPoint()
- val sampleProviderFactory by extensionPoint<SampleProviderFactory>()
+ public val sampleProviderFactory: ExtensionPoint<SampleProviderFactory> by extensionPoint()
@OptIn(DokkaPluginApiPreview::class)
override fun pluginApiPreviewAcknowledgement(): PluginApiPreviewAcknowledgement = PluginApiPreviewAcknowledgement
diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/KotlinToJavaService.kt b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/KotlinToJavaService.kt
index 1b42a1b8..c8e99d10 100644
--- a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/KotlinToJavaService.kt
+++ b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/KotlinToJavaService.kt
@@ -8,6 +8,6 @@ import org.jetbrains.dokka.InternalDokkaApi
import org.jetbrains.dokka.links.DRI
@InternalDokkaApi
-interface KotlinToJavaService {
- fun findAsJava(kotlinDri: DRI): DRI?
+public interface KotlinToJavaService {
+ public fun findAsJava(kotlinDri: DRI): DRI?
}
diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ModuleAndPackageDocumentationReader.kt b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ModuleAndPackageDocumentationReader.kt
index eb08e888..70419e0e 100644
--- a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ModuleAndPackageDocumentationReader.kt
+++ b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/ModuleAndPackageDocumentationReader.kt
@@ -12,8 +12,8 @@ import org.jetbrains.dokka.model.SourceSetDependent
import org.jetbrains.dokka.model.doc.DocumentationNode
@InternalDokkaApi
-interface ModuleAndPackageDocumentationReader {
- fun read(module: DModule): SourceSetDependent<DocumentationNode>
- fun read(pkg: DPackage): SourceSetDependent<DocumentationNode>
- fun read(module: DokkaConfiguration.DokkaModuleDescription): DocumentationNode?
+public interface ModuleAndPackageDocumentationReader {
+ public fun read(module: DModule): SourceSetDependent<DocumentationNode>
+ public fun read(pkg: DPackage): SourceSetDependent<DocumentationNode>
+ public fun read(module: DokkaConfiguration.DokkaModuleDescription): DocumentationNode?
}
diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SampleProvider.kt b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SampleProvider.kt
index 2e1564e6..472d17f0 100644
--- a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SampleProvider.kt
+++ b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SampleProvider.kt
@@ -8,13 +8,13 @@ import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.dokka.InternalDokkaApi
@InternalDokkaApi
-interface SampleProviderFactory {
+public interface SampleProviderFactory {
/**
* [SampleProvider] is a short-lived closeable instance.
* It assumes that [SampleProvider] scope of use is not big.
* Otherwise, it can lead to high memory consumption / leaks during Dokka running.
*/
- fun build(): SampleProvider
+ public fun build(): SampleProvider
}
/**
@@ -23,12 +23,14 @@ interface SampleProviderFactory {
* In general case, it creates a separate project to analysis samples directories.
*/
@InternalDokkaApi
-interface SampleProvider: AutoCloseable {
- class SampleSnippet(val imports: String, val body:String)
-
+public interface SampleProvider: AutoCloseable {
+ public class SampleSnippet(
+ public val imports: String,
+ public val body: String
+ )
/**
* @return [SampleSnippet] or null if it has not found by [fqLink]
*/
- fun getSample(sourceSet: DokkaConfiguration.DokkaSourceSet, fqLink: String): SampleSnippet?
+ public fun getSample(sourceSet: DokkaConfiguration.DokkaSourceSet, fqLink: String): SampleSnippet?
}
diff --git a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SyntheticDocumentableDetector.kt b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SyntheticDocumentableDetector.kt
index e7d83471..0a2d64de 100644
--- a/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SyntheticDocumentableDetector.kt
+++ b/subprojects/analysis-kotlin-api/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/internal/SyntheticDocumentableDetector.kt
@@ -10,6 +10,6 @@ import org.jetbrains.dokka.model.Documentable
// TODO [beresnev] isSynthetic could be a property of Documentable
@InternalDokkaApi
-interface SyntheticDocumentableDetector {
- fun isSynthetic(documentable: Documentable, sourceSet: DokkaConfiguration.DokkaSourceSet): Boolean
+public interface SyntheticDocumentableDetector {
+ public fun isSynthetic(documentable: Documentable, sourceSet: DokkaConfiguration.DokkaSourceSet): Boolean
}