aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-10-18 23:04:26 +0200
committerBłażej Kardyś <bkardys@virtuslab.com>2020-11-09 14:56:24 +0100
commitbe80016c77e9b98a75d8e832dd5723737f0e1d72 (patch)
treed4a1124e9278fcfb3a1c1b00cf743d8553ded011 /plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
parent1aba0ec4973d7915caa93f1e9b3146ad82111903 (diff)
downloaddokka-be80016c77e9b98a75d8e832dd5723737f0e1d72.tar.gz
dokka-be80016c77e9b98a75d8e832dd5723737f0e1d72.tar.bz2
dokka-be80016c77e9b98a75d8e832dd5723737f0e1d72.zip
Cleaning querying from plugins where possible
Diffstat (limited to 'plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt')
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
index 1d62a206..60c2e5cc 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
@@ -1,5 +1,6 @@
package org.jetbrains.dokka.kotlinAsJava.signatures
+import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.signatures.JvmSignatureUtils
import org.jetbrains.dokka.base.signatures.SignatureProvider
import org.jetbrains.dokka.base.transformers.pages.comments.CommentsToContentConverter
@@ -11,11 +12,18 @@ import org.jetbrains.dokka.model.properties.WithExtraProperties
import org.jetbrains.dokka.pages.ContentKind
import org.jetbrains.dokka.pages.ContentNode
import org.jetbrains.dokka.pages.TextStyle
+import org.jetbrains.dokka.plugability.DokkaContext
+import org.jetbrains.dokka.plugability.plugin
+import org.jetbrains.dokka.plugability.querySingle
import org.jetbrains.dokka.utilities.DokkaLogger
import kotlin.text.Typography.nbsp
-class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogger) : SignatureProvider,
+class JavaSignatureProvider internal constructor(ctcc: CommentsToContentConverter, logger: DokkaLogger) : SignatureProvider,
JvmSignatureUtils by JavaSignatureUtils {
+ constructor(context: DokkaContext) : this(
+ context.plugin<DokkaBase>().querySingle { commentsToContentConverter },
+ context.logger
+ )
private val contentBuilder = PageContentBuilder(ctcc, this, logger)
private val ignoredVisibilities = setOf(JavaVisibility.Default)