All Downloads are FREE. Search and download functionalities are using the official Maven repository.

translators.KotlinAsJavaDocumentableToPageTranslator.kt Maven / Gradle / Ivy

/*
 * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
 */

package org.jetbrains.dokka.kotlinAsJava.translators

import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.DokkaBaseConfiguration
import org.jetbrains.dokka.model.DModule
import org.jetbrains.dokka.pages.ModulePageNode
import org.jetbrains.dokka.plugability.*
import org.jetbrains.dokka.transformers.documentation.DocumentableToPageTranslator
import org.jetbrains.dokka.utilities.DokkaLogger
import org.jetbrains.dokka.analysis.kotlin.internal.InternalKotlinAnalysisPlugin

public class KotlinAsJavaDocumentableToPageTranslator(
    context: DokkaContext
) : DocumentableToPageTranslator {
    private val configuration = configuration(context)
    private val commentsToContentConverter = context.plugin().querySingle { commentsToContentConverter }
    private val signatureProvider = context.plugin().querySingle { signatureProvider }
    private val customTagContentProviders = context.plugin().query { customTagContentProvider }
    private val documentableSourceLanguageParser = context.plugin().querySingle { documentableSourceLanguageParser }
    private val logger: DokkaLogger = context.logger

    override fun invoke(module: DModule): ModulePageNode =
        KotlinAsJavaPageCreator(
            configuration,
            commentsToContentConverter,
            signatureProvider,
            logger,
            customTagContentProviders,
            documentableSourceLanguageParser
        ).pageForModule(module)
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy