diff options
Diffstat (limited to 'subprojects')
40 files changed, 184 insertions, 159 deletions
diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin.kt b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin.kt index cd6359cc..9426adf1 100644 --- a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin.kt +++ b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavaAnalysisPlugin.kt @@ -26,48 +26,48 @@ import java.io.File @InternalDokkaApi -interface ProjectProvider { - fun getProject(sourceSet: DokkaSourceSet, context: DokkaContext): Project +public interface ProjectProvider { + public fun getProject(sourceSet: DokkaSourceSet, context: DokkaContext): Project } @InternalDokkaApi -interface SourceRootsExtractor { - fun extract(sourceSet: DokkaSourceSet, context: DokkaContext): List<File> +public interface SourceRootsExtractor { + public fun extract(sourceSet: DokkaSourceSet, context: DokkaContext): List<File> } @InternalDokkaApi -interface BreakingAbstractionKotlinLightMethodChecker { +public interface BreakingAbstractionKotlinLightMethodChecker { // TODO [beresnev] not even sure it's needed, but left for compatibility and to preserve behaviour - fun isLightAnnotation(annotation: PsiAnnotation): Boolean - fun isLightAnnotationAttribute(attribute: JvmAnnotationAttribute): Boolean + public fun isLightAnnotation(annotation: PsiAnnotation): Boolean + public fun isLightAnnotationAttribute(attribute: JvmAnnotationAttribute): Boolean } @InternalDokkaApi -class JavaAnalysisPlugin : DokkaPlugin() { +public class JavaAnalysisPlugin : DokkaPlugin() { // single - val projectProvider by extensionPoint<ProjectProvider>() + public val projectProvider: ExtensionPoint<ProjectProvider> by extensionPoint() // single - val sourceRootsExtractor by extensionPoint<SourceRootsExtractor>() + public val sourceRootsExtractor: ExtensionPoint<SourceRootsExtractor> by extensionPoint() // multiple - val docCommentCreators by extensionPoint<DocCommentCreator>() + public val docCommentCreators: ExtensionPoint<DocCommentCreator> by extensionPoint() // multiple - val docCommentParsers by extensionPoint<DocCommentParser>() + public val docCommentParsers: ExtensionPoint<DocCommentParser> by extensionPoint() // none or more - val inheritDocTagContentProviders by extensionPoint<InheritDocTagContentProvider>() + public val inheritDocTagContentProviders: ExtensionPoint<InheritDocTagContentProvider> by extensionPoint() // TODO [beresnev] figure out a better way depending on what it's used for - val kotlinLightMethodChecker by extensionPoint<BreakingAbstractionKotlinLightMethodChecker>() + public val kotlinLightMethodChecker: ExtensionPoint<BreakingAbstractionKotlinLightMethodChecker> by extensionPoint() private val docCommentFactory by lazy { DocCommentFactory(query { docCommentCreators }.reversed()) } - val docCommentFinder by lazy { + public val docCommentFinder: DocCommentFinder by lazy { DocCommentFinder(logger, docCommentFactory) } diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavadocTag.kt b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavadocTag.kt index 25aaf582..23aee764 100644 --- a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavadocTag.kt +++ b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/JavadocTag.kt @@ -8,45 +8,47 @@ import com.intellij.psi.PsiMethod import org.jetbrains.dokka.InternalDokkaApi @InternalDokkaApi -sealed class JavadocTag(val name: String) - -object AuthorJavadocTag : JavadocTag("author") -object DeprecatedJavadocTag : JavadocTag("deprecated") -object DescriptionJavadocTag : JavadocTag("description") -object ReturnJavadocTag : JavadocTag("return") -object SinceJavadocTag : JavadocTag("since") - -class ParamJavadocTag( - val method: PsiMethod, - val paramName: String, - val paramIndex: Int +public sealed class JavadocTag( + public val name: String +) + +public object AuthorJavadocTag : JavadocTag("author") +public object DeprecatedJavadocTag : JavadocTag("deprecated") +public object DescriptionJavadocTag : JavadocTag("description") +public object ReturnJavadocTag : JavadocTag("return") +public object SinceJavadocTag : JavadocTag("since") + +public class ParamJavadocTag( + public val method: PsiMethod, + public val paramName: String, + public val paramIndex: Int ) : JavadocTag(name) { - companion object { - const val name: String = "param" + public companion object { + public const val name: String = "param" } } -class SeeJavadocTag( - val qualifiedReference: String +public class SeeJavadocTag( + public val qualifiedReference: String ) : JavadocTag(name) { - companion object { - const val name: String = "see" + public companion object { + public const val name: String = "see" } } -sealed class ThrowingExceptionJavadocTag( +public sealed class ThrowingExceptionJavadocTag( name: String, - val exceptionQualifiedName: String? + public val exceptionQualifiedName: String? ) : JavadocTag(name) -class ThrowsJavadocTag(exceptionQualifiedName: String?) : ThrowingExceptionJavadocTag(name, exceptionQualifiedName) { - companion object { - const val name: String = "throws" +public class ThrowsJavadocTag(exceptionQualifiedName: String?) : ThrowingExceptionJavadocTag(name, exceptionQualifiedName) { + public companion object { + public const val name: String = "throws" } } -class ExceptionJavadocTag(exceptionQualifiedName: String?) : ThrowingExceptionJavadocTag(name, exceptionQualifiedName) { - companion object { - const val name: String = "exception" +public class ExceptionJavadocTag(exceptionQualifiedName: String?) : ThrowingExceptionJavadocTag(name, exceptionQualifiedName) { + public companion object { + public const val name: String = "exception" } } diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocComment.kt b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocComment.kt index b74d3ff2..be5f7eaa 100644 --- a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocComment.kt +++ b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocComment.kt @@ -11,8 +11,8 @@ import org.jetbrains.dokka.analysis.java.JavadocTag * MUST override equals and hashcode */ @InternalDokkaApi -interface DocComment { - fun hasTag(tag: JavadocTag): Boolean +public interface DocComment { + public fun hasTag(tag: JavadocTag): Boolean - fun resolveTag(tag: JavadocTag): List<DocumentationContent> + public fun resolveTag(tag: JavadocTag): List<DocumentationContent> } diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentCreator.kt b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentCreator.kt index 7c56ddb4..2e22c77c 100644 --- a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentCreator.kt +++ b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentCreator.kt @@ -8,6 +8,6 @@ import com.intellij.psi.PsiNamedElement import org.jetbrains.dokka.InternalDokkaApi @InternalDokkaApi -interface DocCommentCreator { - fun create(element: PsiNamedElement): DocComment? +public interface DocCommentCreator { + public fun create(element: PsiNamedElement): DocComment? } diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFactory.kt b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFactory.kt index 52c0d18b..4647d4d9 100644 --- a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFactory.kt +++ b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFactory.kt @@ -8,10 +8,10 @@ import com.intellij.psi.PsiNamedElement import org.jetbrains.dokka.InternalDokkaApi @InternalDokkaApi -class DocCommentFactory( +public class DocCommentFactory( private val docCommentCreators: List<DocCommentCreator> ) { - fun fromElement(element: PsiNamedElement): DocComment? { + public fun fromElement(element: PsiNamedElement): DocComment? { docCommentCreators.forEach { creator -> val comment = creator.create(element) if (comment != null) { diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFinder.kt b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFinder.kt index 8b88f790..18463e0e 100644 --- a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFinder.kt +++ b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocCommentFinder.kt @@ -14,11 +14,11 @@ import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.utilities.DokkaLogger @InternalDokkaApi -class DocCommentFinder( +public class DocCommentFinder( private val logger: DokkaLogger, private val docCommentFactory: DocCommentFactory, ) { - fun findClosestToElement(element: PsiNamedElement): DocComment? { + public fun findClosestToElement(element: PsiNamedElement): DocComment? { val docComment = docCommentFactory.fromElement(element) if (docComment != null) { return docComment diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocumentationContent.kt b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocumentationContent.kt index 18548951..64e9ceb8 100644 --- a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocumentationContent.kt +++ b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/doccomment/DocumentationContent.kt @@ -8,8 +8,8 @@ import org.jetbrains.dokka.InternalDokkaApi import org.jetbrains.dokka.analysis.java.JavadocTag @InternalDokkaApi -interface DocumentationContent { - val tag: JavadocTag +public interface DocumentationContent { + public val tag: JavadocTag - fun resolveSiblings(): List<DocumentationContent> + public fun resolveSiblings(): List<DocumentationContent> } diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DocCommentParser.kt b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DocCommentParser.kt index d7863e7e..4a381e80 100644 --- a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DocCommentParser.kt +++ b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/DocCommentParser.kt @@ -10,7 +10,7 @@ import org.jetbrains.dokka.analysis.java.doccomment.DocComment import org.jetbrains.dokka.model.doc.DocumentationNode @InternalDokkaApi -interface DocCommentParser { - fun canParse(docComment: DocComment): Boolean - fun parse(docComment: DocComment, context: PsiNamedElement): DocumentationNode +public interface DocCommentParser { + public fun canParse(docComment: DocComment): Boolean + public fun parse(docComment: DocComment, context: PsiNamedElement): DocumentationNode } diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/JavadocParser.kt b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/JavadocParser.kt index ec644692..140e64c9 100644 --- a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/JavadocParser.kt +++ b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/JavadocParser.kt @@ -14,7 +14,7 @@ internal fun interface JavaDocumentationParser { } @InternalDokkaApi -class JavadocParser( +public class JavadocParser( private val docCommentParsers: List<DocCommentParser>, private val docCommentFinder: DocCommentFinder ) : JavaDocumentationParser { diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/DocTagParserContext.kt b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/DocTagParserContext.kt index cd9e5321..e8df804b 100644 --- a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/DocTagParserContext.kt +++ b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/DocTagParserContext.kt @@ -10,7 +10,7 @@ import org.jetbrains.dokka.model.doc.DocumentationNode import java.util.* @InternalDokkaApi -class DocTagParserContext { +public class DocTagParserContext { /** * exists for resolving `@link element` links, where the referenced * PSI element is mapped as DRI @@ -30,7 +30,7 @@ class DocTagParserContext { /** * @return key of the stored DRI */ - fun store(dri: DRI): String { + public fun store(dri: DRI): String { val id = dri.toString() driMap[id] = dri return id @@ -39,13 +39,13 @@ class DocTagParserContext { /** * @return key of the stored documentation node */ - fun store(documentationNode: DocumentationNode): String { + public fun store(documentationNode: DocumentationNode): String { val id = UUID.randomUUID().toString() inheritDocSections[id] = documentationNode return id } - fun getDri(id: String): DRI? = driMap[id] + public fun getDri(id: String): DRI? = driMap[id] - fun getDocumentationNode(id: String): DocumentationNode? = inheritDocSections[id] + public fun getDocumentationNode(id: String): DocumentationNode? = inheritDocSections[id] } diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagContentProvider.kt b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagContentProvider.kt index 33e99ed9..a09f85c4 100644 --- a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagContentProvider.kt +++ b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/parsers/doctag/InheritDocTagContentProvider.kt @@ -8,7 +8,7 @@ import org.jetbrains.dokka.InternalDokkaApi import org.jetbrains.dokka.analysis.java.doccomment.DocumentationContent @InternalDokkaApi -interface InheritDocTagContentProvider { - fun canConvert(content: DocumentationContent): Boolean - fun convertToHtml(content: DocumentationContent, docTagParserContext: DocTagParserContext): String +public interface InheritDocTagContentProvider { + public fun canConvert(content: DocumentationContent): Boolean + public fun convertToHtml(content: DocumentationContent, docTagParserContext: DocTagParserContext): String } diff --git a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiUtil.kt b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiUtil.kt index 38dbe30b..162f940e 100644 --- a/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiUtil.kt +++ b/subprojects/analysis-java-psi/src/main/kotlin/org/jetbrains/dokka/analysis/java/util/PsiUtil.kt @@ -17,7 +17,7 @@ internal val PsiElement.parentsWithSelf: Sequence<PsiElement> get() = generateSequence(this) { if (it is PsiFile) null else it.parent } @InternalDokkaApi -fun DRI.Companion.from(psi: PsiElement) = psi.parentsWithSelf.run { +public fun DRI.Companion.from(psi: PsiElement): DRI = psi.parentsWithSelf.run { val psiMethod = firstIsInstanceOrNull<PsiMethod>() val psiField = firstIsInstanceOrNull<PsiField>() val classes = filterIsInstance<PsiClass>().filterNot { it is PsiTypeParameter } @@ -92,8 +92,10 @@ internal fun PsiElement.getNextSiblingIgnoringWhitespace(withItself: Boolean = f } @InternalDokkaApi -class PsiDocumentableSource(val psi: PsiNamedElement) : DocumentableSource { - override val path = psi.containingFile.virtualFile.path +public class PsiDocumentableSource( + public val psi: PsiNamedElement +) : DocumentableSource { + override val path: String = psi.containingFile.virtualFile.path override fun computeLineNumber(): Int? { val range = psi.getChildOfType<PsiIdentifier>()?.textRange ?: psi.textRange @@ -103,7 +105,7 @@ class PsiDocumentableSource(val psi: PsiNamedElement) : DocumentableSource { } } -inline fun <reified T : PsiElement> PsiElement.getChildOfType(): T? { +public inline fun <reified T : PsiElement> PsiElement.getChildOfType(): T? { return PsiTreeUtil.getChildOfType(this, T::class.java) } 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 } diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/AnalysisContextCreator.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/AnalysisContextCreator.kt index 13c7d30d..67476a50 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/AnalysisContextCreator.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/AnalysisContextCreator.kt @@ -13,8 +13,8 @@ import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment import org.jetbrains.kotlin.descriptors.ModuleDescriptor @InternalDokkaApi -interface AnalysisContextCreator { - fun create( +public interface AnalysisContextCreator { + public fun create( project: MockProject, moduleDescriptor: ModuleDescriptor, moduleResolver: ResolverForModule, diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerDescriptorAnalysisPlugin.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerDescriptorAnalysisPlugin.kt index ff9da869..c59a43b2 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerDescriptorAnalysisPlugin.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerDescriptorAnalysisPlugin.kt @@ -20,26 +20,34 @@ import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.translator.Defau import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.translator.DefaultExternalDocumentablesProvider import org.jetbrains.dokka.renderers.PostAction import org.jetbrains.dokka.analysis.kotlin.internal.InternalKotlinAnalysisPlugin +import org.jetbrains.dokka.analysis.kotlin.internal.SampleProviderFactory import org.jetbrains.dokka.plugability.* import org.jetbrains.kotlin.asJava.elements.KtLightAbstractAnnotation @Suppress("unused") @InternalDokkaApi -class CompilerDescriptorAnalysisPlugin : DokkaPlugin() { +public class CompilerDescriptorAnalysisPlugin : DokkaPlugin() { - val kdocFinder by extensionPoint<KDocFinder>() + @InternalDokkaApi + public val kdocFinder: ExtensionPoint<KDocFinder> by extensionPoint() - val descriptorFinder by extensionPoint<DescriptorFinder>() + @InternalDokkaApi + public val descriptorFinder: ExtensionPoint<DescriptorFinder> by extensionPoint() - val klibService by extensionPoint<KLibService>() + @InternalDokkaApi + public val klibService: ExtensionPoint<KLibService> by extensionPoint() - val compilerExtensionPointProvider by extensionPoint<CompilerExtensionPointProvider>() + @InternalDokkaApi + public val compilerExtensionPointProvider: ExtensionPoint<CompilerExtensionPointProvider> by extensionPoint() - val mockApplicationHack by extensionPoint<MockApplicationHack>() + @InternalDokkaApi + public val mockApplicationHack: ExtensionPoint<MockApplicationHack> by extensionPoint() - val analysisContextCreator by extensionPoint<AnalysisContextCreator>() + @InternalDokkaApi + public val analysisContextCreator: ExtensionPoint<AnalysisContextCreator> by extensionPoint() - val kotlinAnalysis by extensionPoint<KotlinAnalysis>() + @InternalDokkaApi + public val kotlinAnalysis: ExtensionPoint<KotlinAnalysis> by extensionPoint() internal val documentableAnalyzerImpl by extending { plugin<InternalKotlinAnalysisPlugin>().documentableSourceLanguageParser providing { CompilerDocumentableSourceLanguageParser() } @@ -72,7 +80,7 @@ class CompilerDescriptorAnalysisPlugin : DokkaPlugin() { * So it should have a possibility to override this extension */ @InternalDokkaApi - val kotlinSampleProviderFactory by extending { + public val kotlinSampleProviderFactory: Extension<SampleProviderFactory, *, *> by extending { plugin<InternalKotlinAnalysisPlugin>().sampleProviderFactory providing ::KotlinSampleProviderFactory } diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerExtensionPointProvider.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerExtensionPointProvider.kt index dace8dc1..e42efe41 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerExtensionPointProvider.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/CompilerExtensionPointProvider.kt @@ -8,11 +8,11 @@ import org.jetbrains.dokka.InternalDokkaApi import org.jetbrains.kotlin.extensions.ApplicationExtensionDescriptor @InternalDokkaApi -interface CompilerExtensionPointProvider { - fun get(): List<CompilerExtensionPoint> +public interface CompilerExtensionPointProvider { + public fun get(): List<CompilerExtensionPoint> - class CompilerExtensionPoint( - val extensionDescriptor: ApplicationExtensionDescriptor<Any>, - val extensions: List<Any> + public class CompilerExtensionPoint( + public val extensionDescriptor: ApplicationExtensionDescriptor<Any>, + public val extensions: List<Any> ) } diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/DescriptorFinder.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/DescriptorFinder.kt index f7224157..db06647d 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/DescriptorFinder.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/DescriptorFinder.kt @@ -9,6 +9,6 @@ import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.psi.KtDeclaration @InternalDokkaApi -interface DescriptorFinder { - fun KtDeclaration.findDescriptor(): DeclarationDescriptor? +public interface DescriptorFinder { + public fun KtDeclaration.findDescriptor(): DeclarationDescriptor? } diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KDocFinder.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KDocFinder.kt index f2bcba90..e5367211 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KDocFinder.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KDocFinder.kt @@ -14,10 +14,10 @@ import org.jetbrains.kotlin.psi.KtElement import org.jetbrains.kotlin.resolve.DescriptorToSourceUtils @InternalDokkaApi -interface KDocFinder { - fun KtElement.findKDoc(): KDocTag? +public interface KDocFinder { + public fun KtElement.findKDoc(): KDocTag? - fun DeclarationDescriptor.find( + public fun DeclarationDescriptor.find( descriptorToPsi: (DeclarationDescriptorWithSource) -> PsiElement? = { DescriptorToSourceUtils.descriptorToDeclaration( it @@ -25,7 +25,7 @@ interface KDocFinder { } ): KDocTag? - fun resolveKDocLink( + public fun resolveKDocLink( fromDescriptor: DeclarationDescriptor, qualifiedName: String, sourceSet: DokkaConfiguration.DokkaSourceSet, diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KLibService.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KLibService.kt index 1a84e779..fc173298 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KLibService.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/KLibService.kt @@ -14,8 +14,8 @@ import org.jetbrains.kotlin.library.KotlinLibrary import org.jetbrains.kotlin.storage.StorageManager @InternalDokkaApi -interface KLibService { - fun KotlinLibrary.createPackageFragmentProvider( +public interface KLibService { + public fun KotlinLibrary.createPackageFragmentProvider( storageManager: StorageManager, metadataModuleDescriptorFactory: KlibMetadataModuleDescriptorFactory, languageVersionSettings: LanguageVersionSettings, @@ -23,5 +23,5 @@ interface KLibService { lookupTracker: LookupTracker ): PackageFragmentProvider? - fun isAnalysisCompatible(kotlinLibrary: KotlinLibrary): Boolean + public fun isAnalysisCompatible(kotlinLibrary: KotlinLibrary): Boolean } diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/MockApplicationHack.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/MockApplicationHack.kt index befbce02..39ca666b 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/MockApplicationHack.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/MockApplicationHack.kt @@ -8,6 +8,6 @@ import com.intellij.mock.MockApplication import org.jetbrains.dokka.InternalDokkaApi @InternalDokkaApi -interface MockApplicationHack { // ¯\_(ツ)_/¯ - fun hack(mockApplication: MockApplication) +public interface MockApplicationHack { // ¯\_(ツ)_/¯ + public fun hack(mockApplication: MockApplication) } diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisContext.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisContext.kt index 50f40aa0..917a86e7 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisContext.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisContext.kt @@ -6,6 +6,7 @@ package org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.configuration import com.intellij.openapi.project.Project import org.jetbrains.dokka.DokkaConfiguration +import org.jetbrains.dokka.InternalDokkaApi import org.jetbrains.dokka.Platform import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.AnalysisContextCreator import org.jetbrains.dokka.analysis.kotlin.descriptors.compiler.CompilerDescriptorAnalysisPlugin @@ -92,9 +93,10 @@ internal class DokkaMessageCollector(private val logger: DokkaLogger) : MessageC override fun hasErrors() = seenErrors } -interface AnalysisContext : Closeable { - val environment: KotlinCoreEnvironment - val resolveSession: ResolveSession - val moduleDescriptor: ModuleDescriptor - val project: Project +@InternalDokkaApi +public interface AnalysisContext : Closeable { + public val environment: KotlinCoreEnvironment + public val resolveSession: ResolveSession + public val moduleDescriptor: ModuleDescriptor + public val project: Project } diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisEnvironment.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisEnvironment.kt index e0fa157c..5a0fc396 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisEnvironment.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/AnalysisEnvironment.kt @@ -90,7 +90,7 @@ internal const val JAR_SEPARATOR = "!/" * $body: optional and can be used to configure environment without creating local variable */ @InternalDokkaApi -class AnalysisEnvironment( +public class AnalysisEnvironment( private val messageCollector: MessageCollector, internal val analysisPlatform: Platform, private val mockApplicationHack: MockApplicationHack, diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinAnalysis.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinAnalysis.kt index 1f7df3f0..4e6f42c9 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinAnalysis.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/configuration/KotlinAnalysis.kt @@ -59,15 +59,15 @@ internal fun SamplesKotlinAnalysis( return EnvironmentKotlinAnalysis(environments, projectKotlinAnalysis) } @DokkaPluginApiPreview -data class DokkaAnalysisConfiguration( +public data class DokkaAnalysisConfiguration( /** * Only for common platform ignore BuiltIns for StdLib since it can cause a conflict * between BuiltIns from a compiler and ones from source code. */ val ignoreCommonBuiltIns: Boolean = DEFAULT_IGNORE_COMMON_BUILT_INS ): ConfigurableBlock { - companion object { - const val DEFAULT_IGNORE_COMMON_BUILT_INS = false + public companion object { + public const val DEFAULT_IGNORE_COMMON_BUILT_INS: Boolean = false } } @@ -75,11 +75,11 @@ data class DokkaAnalysisConfiguration( * First child delegation. It does not close [parent]. */ @InternalDokkaApi -abstract class KotlinAnalysis( +public abstract class KotlinAnalysis( private val parent: KotlinAnalysis? = null ) : Closeable { - operator fun get(key: DokkaSourceSet): AnalysisContext { + public operator fun get(key: DokkaSourceSet): AnalysisContext { return get(key.sourceSetID) } diff --git a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/KotlinSampleProvider.kt b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/KotlinSampleProvider.kt index 38037c1d..5199abf5 100644 --- a/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/KotlinSampleProvider.kt +++ b/subprojects/analysis-kotlin-descriptors/compiler/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/compiler/impl/KotlinSampleProvider.kt @@ -24,7 +24,9 @@ import org.jetbrains.kotlin.psi.KtDeclarationWithBody import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.resolve.lazy.ResolveSession -class KotlinSampleProviderFactory(val context: DokkaContext): SampleProviderFactory { +public class KotlinSampleProviderFactory( + public val context: DokkaContext +): SampleProviderFactory { override fun build(): SampleProvider { return KotlinSampleProvider(context) } @@ -35,7 +37,9 @@ class KotlinSampleProviderFactory(val context: DokkaContext): SampleProviderFact * with [processBody] and [processImports] */ @InternalDokkaApi -open class KotlinSampleProvider(val context: DokkaContext): SampleProvider { +public open class KotlinSampleProvider( + public val context: DokkaContext +): SampleProvider { private val kDocFinder: KDocFinder = context.plugin<CompilerDescriptorAnalysisPlugin>().querySingle { kdocFinder } private val analysis = lazy { /** diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/CoreKotlinCacheService.kt b/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/CoreKotlinCacheService.kt index 7cda9b70..2a299009 100644 --- a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/CoreKotlinCacheService.kt +++ b/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/CoreKotlinCacheService.kt @@ -25,7 +25,7 @@ internal class CoreKotlinCacheService(private val resolutionFacade: DokkaResolut override fun getResolutionFacadeByFile( file: PsiFile, - platform: org.jetbrains.kotlin.platform.TargetPlatform + platform: TargetPlatform ): ResolutionFacade { return resolutionFacade } @@ -39,7 +39,7 @@ internal class CoreKotlinCacheService(private val resolutionFacade: DokkaResolut override fun getResolutionFacadeByModuleInfo( moduleInfo: ModuleInfo, - platform: org.jetbrains.kotlin.platform.TargetPlatform + platform: TargetPlatform ): ResolutionFacade { return resolutionFacade } diff --git a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeDescriptorAnalysisPlugin.kt b/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeDescriptorAnalysisPlugin.kt index fe62f844..e170b740 100644 --- a/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeDescriptorAnalysisPlugin.kt +++ b/subprojects/analysis-kotlin-descriptors/ide/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/descriptors/ide/IdeDescriptorAnalysisPlugin.kt @@ -11,7 +11,7 @@ import org.jetbrains.dokka.plugability.DokkaPluginApiPreview import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement @InternalDokkaApi -class IdeDescriptorAnalysisPlugin : DokkaPlugin() { +public class IdeDescriptorAnalysisPlugin : DokkaPlugin() { internal val ideKdocFinder by extending { plugin<CompilerDescriptorAnalysisPlugin>().kdocFinder providing ::IdePluginKDocFinder diff --git a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinSampleProvider.kt b/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinSampleProvider.kt index ecd22aa9..c17ad75f 100644 --- a/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinSampleProvider.kt +++ b/subprojects/analysis-kotlin-symbols/src/main/kotlin/org/jetbrains/dokka/analysis/kotlin/symbols/services/KotlinSampleProvider.kt @@ -21,7 +21,9 @@ import org.jetbrains.kotlin.psi.KtBlockExpression import org.jetbrains.kotlin.psi.KtDeclarationWithBody import org.jetbrains.kotlin.psi.KtFile -class KotlinSampleProviderFactory(val context: DokkaContext): SampleProviderFactory { +public class KotlinSampleProviderFactory( + public val context: DokkaContext +): SampleProviderFactory { override fun build(): SampleProvider { return KotlinSampleProvider(context) } @@ -32,7 +34,9 @@ class KotlinSampleProviderFactory(val context: DokkaContext): SampleProviderFact * with [processBody] and [processImports] */ @InternalDokkaApi -open class KotlinSampleProvider(val context: DokkaContext): SampleProvider { +public open class KotlinSampleProvider( + public val context: DokkaContext +): SampleProvider { private val kotlinAnalysis = SamplesKotlinAnalysis( sourceSets = context.configuration.sourceSets, context = context, diff --git a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownApi.kt b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownApi.kt index 58ab5e70..bc56b596 100644 --- a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownApi.kt +++ b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownApi.kt @@ -9,4 +9,4 @@ import org.jetbrains.dokka.InternalDokkaApi // TODO [beresnev] move/rename if it's only used for CustomDocTag. for now left as is for compatibility @InternalDokkaApi -val MARKDOWN_ELEMENT_FILE_NAME = MarkdownElementTypes.MARKDOWN_FILE.name +public val MARKDOWN_ELEMENT_FILE_NAME: String = MarkdownElementTypes.MARKDOWN_FILE.name diff --git a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownParser.kt b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownParser.kt index 00f1e25d..256c7b98 100644 --- a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownParser.kt +++ b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/MarkdownParser.kt @@ -24,7 +24,7 @@ import java.net.URL import org.intellij.markdown.parser.MarkdownParser as IntellijMarkdownParser @InternalDokkaApi -open class MarkdownParser( +public open class MarkdownParser( private val externalDri: (String) -> DRI?, private val kdocLocation: String?, ) : Parser() { @@ -45,7 +45,7 @@ open class MarkdownParser( return CustomDocTag(children = parsed, params = emptyMap(), name = "") } - override fun preparse(text: String) = text.replace("\r\n", "\n").replace("\r", "\n") + override fun preparse(text: String): String = text.replace("\r\n", "\n").replace("\r", "\n") override fun parseTagWithBody(tagName: String, content: String): TagWrapper = when (tagName) { @@ -501,8 +501,8 @@ open class MarkdownParser( ) - companion object { - fun DRI.fqDeclarationName(): String? { + public companion object { + public fun DRI.fqDeclarationName(): String? { if (this.target !is PointingToDeclaration) { return null } diff --git a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/ParseUtils.kt b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/ParseUtils.kt index ba5d2df2..0293d470 100644 --- a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/ParseUtils.kt +++ b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/ParseUtils.kt @@ -13,7 +13,7 @@ import org.jsoup.internal.StringUtil import org.jsoup.nodes.Entities @InternalDokkaApi -fun String.parseHtmlEncodedWithNormalisedSpaces( +public fun String.parseHtmlEncodedWithNormalisedSpaces( renderWhiteCharactersAsSpaces: Boolean ): List<DocTag> { val accum = StringBuilder() diff --git a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/Parser.kt b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/Parser.kt index e97d7b0c..28afa0c4 100644 --- a/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/Parser.kt +++ b/subprojects/analysis-markdown-jb/src/main/kotlin/org/jetbrains/dokka/analysis/markdown/jb/Parser.kt @@ -8,13 +8,13 @@ import org.jetbrains.dokka.InternalDokkaApi import org.jetbrains.dokka.model.doc.* @InternalDokkaApi -abstract class Parser { +public abstract class Parser { - abstract fun parseStringToDocNode(extractedString: String): DocTag + public abstract fun parseStringToDocNode(extractedString: String): DocTag protected abstract fun preparse(text: String): String - open fun parse(text: String): DocumentationNode = + public open fun parse(text: String): DocumentationNode = DocumentationNode(extractTagsToListOfPairs(preparse(text)).map { (tag, content) -> parseTagWithBody(tag, content) }) protected open fun parseTagWithBody(tagName: String, content: String): TagWrapper = |